# Slides and example from Delphi Day 2025 presentation and after-thoughts (Afterwarp, shadow maps, BGFX and deferred rendering)

**URL:** <https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950>\
**Category:** News\
**Created:** [June 21, 2025, 11:45am UTC](https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950 "2025-06-21T11:45:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [June 21, 2025, 11:45am UTC](https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950/1 "2025-06-21T11:45:07Z")

</div>

| [![Throw chickens](https://forum.castle-engine.io/uploads/default/original/2X/3/35807eb50b8489b1843ca99eea2b0da797888be9.png)](https://castle-engine.io/wp/wp-content/uploads/2025/06/screenshot.png "Throw chickens") |

I’m traveling back home after enjoying [Delphi Day 2025 in Piacenza](https://www.delphiday.it/).

1. [Slides are available here](https://castle-engine.io/delphiday2025) and one new (simple and fun 🙂 ) example is part of the engine now: [examples/physics/physics\_throw\_chickens](https://github.com/castle-engine/castle-engine/tree/master/examples/physics/physics_throw_chickens).

2. I also watched a number of inspiring presentations from fellow Delphi users. It was really good to see so much activity around Delphi and Pascal!

3. One talk that in particular remains in my memory was about the [Afterwarp Framework by Yuriy Kotsarenko](https://afterwarp.io/). I was truly amazed by some features he shown, in particular the deferred shading implementation combined with shadow maps that allows to have 65k dynamic light sources casting shadows (and he showed demos really proving it — one demo with really ridiculous 65k dynamic lights, one demo with over a thousand lights casting shadows and car with headlights moving through them). Really impressive, and it makes me jealous, and I told him about it 🙂

4. I had a few “nudges” recently to focus more on our [shadow maps](https://castle-engine.io/x3d_extensions_shadow_maps.php) as a preferred shadows algorithm, and maybe leave the [shadow volumes](https://castle-engine.io/shadow_volumes) as… maintained, but not default.

5. So, thoughts coming from the above:

Have fun everyone! Stay tuned for more technical announcements next week. And if you like what we do [please support us](https://castle-engine.io/donate) e.g. by [subscribing on Patreon](https://www.patreon.com/c/castleengine).

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [June 21, 2025, 5:49pm UTC](https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950/2 "2025-06-21T17:49:42Z")

</div>



---

<div class="post-metadata">

**Author:** ![kagamma](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/kagamma/32/226_2.png) [@kagamma](https://forum.castle-engine.io/u/kagamma)\
**Post date:** [June 22, 2025, 1:59am UTC](https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950/3 "2025-06-22T01:59:13Z")

</div>

Correct me if I am wrong, but I don’t see how BGFX automatically give us deferred rendering. From my understanding BGFX is just a wrapper around existing graphics API, so we would still have to implement deferred rendering in BGFX the same way we do it in OpenGL.

Their own example demonstrates that you must handle everything yourself: [bgfx/examples/21-deferred at master · bkaradzic/bgfx · GitHub](https://github.com/bkaradzic/bgfx/tree/master/examples/21-deferred)

Hybrid approach is easier to do, especially when dealing with transparent objects (deferred rendering for solid objects in one pass, forward rendering for transparent objects in another pass)

Edit: I think the first step would be allows the current renderer to render geometry information (normals, specular, pbr etc) to g-buffers. This is necessary for both deferred renderer, and any screen effects that requires additional geometry information in order to implement (like [Screen Space Reflections effect, enhancements to GLSL API for effects – Castle Game Engine](https://castle-engine.io/wp/2020/11/07/screen-space-reflections-effect-enhancements-to-glsl-api-for-effects/)). It also opens the possibility of implementing a deferred renderer without having to modify the engine’s source code.

---

<div class="post-metadata">

**Author:** ![edj](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/edj/32/1701_2.png) [@edj](https://forum.castle-engine.io/u/edj)\
**Post date:** [June 23, 2025, 2:37pm UTC](https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950/4 "2025-06-23T14:37:29Z")

</div>

I am honored to have been named! I look forward to all shadow progress. My constraint currently is the requirement to have the light and receiver in the same x3d node creates complications since each terrain tile and water tile are their own TCastleScene.

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [June 24, 2025, 9:53am UTC](https://forum.castle-engine.io/t/slides-and-example-from-delphi-day-2025-presentation-and-after-thoughts-afterwarp-shadow-maps-bgfx-and-deferred-rendering/1950/5 "2025-06-24T09:53:30Z")

</div>

> [@kagamma](#):
>
> Correct me if I am wrong, but I don’t see how BGFX automatically give us deferred rendering. From my understanding BGFX is just a wrapper around existing graphics API, so we would still have to implement deferred rendering in BGFX the same way we do it in OpenGL.
> 
> Their own example demonstrates that you must handle everything yourself: [bgfx/examples/21-deferred at master · bkaradzic/bgfx · GitHub](https://github.com/bkaradzic/bgfx/tree/master/examples/21-deferred)

Oh, you’re absolutely right, thanks for this.

When writing above news post, I saw that BGFX has the [deferred rendering example](https://bkaradzic.github.io/bgfx/examples.html#deferred), and I incorrectly assumed “oh, so they have a simple toggle to switch to deferred rendering”. Looking now into the C++ source code, it’s indeed more like “you can do deferred rendering, but you need to manually setup the buffers and operations on them”. I’ll edit the news post accordingly.

I agree with the rest too 🙂
