Cleanup, overpower bloom

This commit is contained in:
2025-11-13 23:31:16 +00:00
parent cffa75c014
commit 295a5f7e1d
4 changed files with 14 additions and 36 deletions
+1 -11
View File
@@ -96,7 +96,6 @@ renderLightingNoShadows positiontexture normaltexture lightPoints pdata = do
glStencilFunc GL_NOTEQUAL 128 255
glStencilOp GL_KEEP GL_KEEP GL_KEEP
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_TRUE
-- glDisable GL_STENCIL_TEST
renderFlatLighting :: RenderData -> IO ()
@@ -161,10 +160,7 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
glColorMask GL_FALSE GL_FALSE GL_FALSE GL_FALSE
-- setup stencil
with 0 $
glClearNamedFramebufferiv
(pdata ^. fboLighting . _1 . unFBO)
GL_STENCIL
0
glClearNamedFramebufferiv (pdata ^. fboLighting . _1 . unFBO) GL_STENCIL 0
glDisable GL_CULL_FACE
-- the first bit has been used to stencil out "ceilings" under which we never draw
glStencilFunc GL_NOTEQUAL 128 255
@@ -175,18 +171,12 @@ renderShadows shadrendertype nWalls nSils nCaps positiontexture normaltexture li
case shadrendertype of
GeoObjShads -> do
--draw silhouette shadows
glEnable GL_DEPTH_CLAMP
glUseProgram llinesShad
glDrawArrays GL_TRIANGLES 0 ((fromIntegral nSils * 6) `div` 4)
--draw caps on the near plane as required
glEnable GL_CULL_FACE
glCullFace GL_BACK
glUseProgram lcapShad
-- glUniform3f 0 x y z
-- glUniform4f 1 r g b rad
-- glFrontFace(GL_CW)
glDrawArrays GL_TRIANGLES 0 (fromIntegral nCaps)
-- glFrontFace(GL_CCW)
glDisable GL_DEPTH_CLAMP
_ -> return ()
--draw lightmap itself