Tweak clouds

This commit is contained in:
2023-03-20 18:24:07 +00:00
parent 695f849f77
commit 7d0bb7f229
11 changed files with 88 additions and 63 deletions
+7 -4
View File
@@ -43,9 +43,13 @@ createLightMap ::
ObjectShadows ->
-- | the texture object giving positions
TO ->
(Point3 -> Float -> IO ()) -> -- attempt at drawing shadow not using geo shader
-- | the texture object giving normals
TO ->
IO ()
createLightMap cfig pdata lightPoints nWalls nSils nCaps shadsdrawtype toPos drawCPUShadows = case shadsdrawtype of
createLightMap cfig pdata lightPoints nWalls nSils nCaps shadsdrawtype
toPos
normaltexture
= case shadsdrawtype of
InstancingShads -> instanceLightMap cfig pdata lightPoints nWalls nSils nCaps toPos
NoShadows -> do
glBindFramebuffer GL_FRAMEBUFFER (_unFBO (fst (_fboLighting pdata)))
@@ -183,14 +187,13 @@ createLightMap cfig pdata lightPoints nWalls nSils nCaps shadsdrawtype toPos dra
GL_UNSIGNED_SHORT
nullPtr
glDisable GL_DEPTH_CLAMP
CPUObjShads -> drawCPUShadows (V3 x y z) rad
NoObjShads -> return ()
--draw lightmap itself
glDepthFunc GL_ALWAYS
-- bind world position texture
glDisable GL_CULL_FACE
bindTO toPos
glBindTextureUnit 1 (pdata ^. fboBase . _2 . _3 . unTO)
glBindTextureUnit 1 (normaltexture ^. unTO)
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_TRUE
glStencilFunc GL_EQUAL 0 255
glUseProgram (ltextShad ^. shadName) --Just (_shadProg ltextShad)