Use stencil test to not draw floors where there are chasms

This commit is contained in:
2025-08-05 19:57:49 +01:00
parent 83124703c5
commit df443744db
4 changed files with 44 additions and 38 deletions
+1
View File
@@ -153,6 +153,7 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
-- 1. stencil out the shadows from this light's point of view
-- 2. calculate lighting based on each fragment's position and normal
flip VFSM.mapM_ (VFSM.fromList lightPoints) $ \(V3 x y z, rad, V3 r g b) -> do
-- note that the stencil shadows rely on the depth buffer
glDepthFunc GL_LESS
-- setup stencil
glColorMask GL_FALSE GL_FALSE GL_FALSE GL_FALSE