Working shadows on clouds

This commit is contained in:
2021-09-01 11:18:53 +01:00
parent 82551328a1
commit f3ea46d7d0
5 changed files with 44 additions and 33 deletions
+3 -2
View File
@@ -37,8 +37,9 @@ createLightMap
-> Int -- ^ number of walls
-> Int -- ^ number of silhoutte lines to draw
-> Int -- ^ number of "caps" to attempt to draw
-> TextureObject -- ^ the texture object giving positions
-> IO ()
createLightMap pdata lightPoints nWalls nSils nCaps = do
createLightMap pdata lightPoints nWalls nSils nCaps toPos = do
-- we assume that the renderbuffer's depth has been correctly set elsewhere
-- we will not be changing that here
depthMask $= Disabled
@@ -79,7 +80,7 @@ createLightMap pdata lightPoints nWalls nSils nCaps = do
--draw lightmap itself
depthFunc $= Just Always
cullFace $= Nothing
bindTO $ snd $ snd $ _fboBase pdata
bindTO toPos
colorMask $= Color4 Enabled Enabled Enabled Enabled
stencilOp $= (OpKeep,OpKeep,OpKeep)
stencilFunc $= (Equal, 0, 255)