Stencil out windows over ceilings

This commit is contained in:
2025-11-01 11:41:08 +00:00
parent d35a41944c
commit 0d0c1a72e0
3 changed files with 191 additions and 195 deletions
+1 -2
View File
@@ -158,12 +158,11 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
-- setup stencil
glColorMask GL_FALSE GL_FALSE GL_FALSE GL_FALSE
glStencilMask 127 -- so we only affect the last 7 bits
with 0 $ \ptr ->
with 0 $
glClearNamedFramebufferiv
(pdata ^. fboLighting . _1 . unFBO)
GL_STENCIL
0
ptr
glDisable GL_CULL_FACE
-- the first bit has been used to stencil out "ceilings" under which we never draw
glStencilFunc GL_NOTEQUAL 128 255