Shadow Mapping Demos

I’ve just uploaded some videos showing the shadow support in action. Check them out:



The Lightcycle demo is more interesting due to several factors. First, it’s a Lightcycle from Tron :). Secondly, it shows self shadowing. And third, it display several rendering artifacts that are yet to be solved. Notice how the shadow is shaggy since there is no blur in the map itself. Also, there is a little acne too (mostly in the wheel section).

Shadow Mapping

Legends talk about a guy who wanted to make an engine with support for real-time shadows. And 10 years later, here it is:

Shadow Mapping

Truth be told, this is extremely experimental. I’m using a standard shadow map technique, where a depth map is rendered from the point of view of a light and then a shader determines if a pixel is lit or shaded based on that information.

The demos are not fancy, but I’ll improve that.

Shadow Mapping

Shadows are supported in a new render pass object called “ForwardRenderPass” (yes, there is a “DeferredRenderPass” coming too). A light must explicitly be configure to cast shadows, making this feature completely optional.

On the TODO list is filtering for the shadow map itself (in order to achieve something like a soft shadow), point lights casting shadow cube maps and a lot bug fixing.