Readd dust cloud rendering

This commit is contained in:
2025-11-12 20:53:37 +00:00
parent 409180959c
commit 383beeae82
4 changed files with 22 additions and 37 deletions
+4
View File
@@ -156,8 +156,11 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
-- for each of the lights:
-- 1. stencil out the shadows from this light's point of view
-- 2. calculate lighting based on each fragment's position and normal
-- TODO stencil out square around light!
-- glEnable GL_SCISSOR_TEST
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
-- glScissor 0 0 200 200
glDepthFunc GL_LESS
glColorMask GL_FALSE GL_FALSE GL_FALSE GL_FALSE
-- setup stencil
@@ -234,6 +237,7 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
(fromIntegral (4 :: Int))
--cleanup: may not be necessary, depending on what comes after...
-- glDisable GL_STENCIL_TEST
-- glDisable GL_SCISSOR_TEST
glStencilFunc GL_NOTEQUAL 128 255
glStencilOp GL_KEEP GL_KEEP GL_KEEP
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_TRUE