Continue render refactor

This commit is contained in:
2023-03-14 14:11:14 +00:00
parent 35f401d8c8
commit 378af69ca5
12 changed files with 118 additions and 112 deletions
+5 -5
View File
@@ -275,12 +275,12 @@ instanceLightMap cfig pdata lightPoints nWalls nSils nCaps toPos = do
glDepthFunc GL_ALWAYS
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_TRUE
glStencilFunc GL_EQUAL 0 255
glUseProgram (pdata ^. shadowLightShader . shadName)
glUseProgram (pdata ^. shadowLightShader . _1 . shadName)
-- bind world position texture
bindTO toPos
-- glBindVertexArray $ pdata ^. shadowLightShader . shadVAO' . vaoName
glDrawArrays
(marshalEPrimitiveMode $ pdata ^. shadowLightShader . shadPrim')
(marshalEPrimitiveMode $ pdata ^. shadowLightShader . _1 . shadPrim')
0
1
glDisable GL_CULL_FACE
@@ -292,7 +292,7 @@ instanceLightMap cfig pdata lightPoints nWalls nSils nCaps toPos = do
glBindTexture GL_TEXTURE_2D_ARRAY (pdata ^. fboShadow . _2 . _1 . unTO)
glEnable GL_BLEND
glBlendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
glUseProgram (pdata ^. shadowCombineShader . shadName)
glUseProgram (pdata ^. shadowCombineShader . _1 . shadName)
glDrawArrays
(marshalEPrimitiveMode EPoints)
0
@@ -322,7 +322,7 @@ pingPongBetween (fb1, to1) (fb2, to2) fs = do
drawShader fs 4
renderFoldable ::
MV.MVector (PrimState IO) FullShader ->
MV.MVector (PrimState IO) (FullShader,VBO) ->
Picture ->
IO ()
renderFoldable shadV struct = do
@@ -333,7 +333,7 @@ renderFoldable shadV struct = do
------------------------------end renderFoldable
renderLayer ::
Layer ->
MV.MVector (PrimState IO) FullShader ->
MV.MVector (PrimState IO) (FullShader,VBO) ->
UMV.MVector (PrimState IO) Int ->
IO ()
renderLayer layer shads counts = do