Tweak clouds
This commit is contained in:
+7
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user