I need a really awesome stencil shadow demo

Blitz3D Forums/Blitz3D Beginners Area/I need a really awesome stencil shadow demo

3DMark?


That would be '03 then... We have moved on from stencils ages ago... '05 uses PSM, which is going to be Carmack's next choice too. From 3DMark05 docs:


3DMark05 uses a type of depth shadow maps called perspective shadow maps (PSM). The implementation is actually a refinement of what is commonly known as PSM, since these have problems with certain angles of light in their simplest form. Here not only are the objects rendered from the direction of the light, as in projection shadow maps, but the depth of each texel in the shadowmap is also stored. Compared to stencil shadows used in 3DMark03, PSM has no need for object edge polygon selection, does not add the vertex load with shadow volume polygons and does not add fill load with the invisible but usually large and numerous shadow volume polygons. PSM (or our refined implementation) still offers a global lighting solution that projects shadows correctly, including self shadowing, and is suited for a wide range of different types of 3D scenes and lighting types.

Shadows from directional light sources use a 2048x2048 resolution depth map of the format R32F. If the hardware supports depth stencil textures (DST), a D24X8 depth map is used of the same size. DST use can be disabled, if a more exact rendering performance comparison is desired, but DST is on by default, because this is a more optimal and logical way to render perspective shadow maps. Shadows from point light sources use a 512x512x6 cube map of the format R32F as depth map.

All color maps in the game tests are DXT 1 compressed, the alpha maps are DXT3 compressed, and all normal maps are DXT 5 compressed.