Try to centralize the number of components per vertex in shapes
This commit is contained in:
+3
-7
@@ -116,8 +116,6 @@ doDrawing' win pdata u = do
|
||||
glClear $ sum [GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT]
|
||||
glDepthFunc GL_LESS
|
||||
-- draw wall occlusions from the camera's point of view
|
||||
-- glEnable GL_CULL_FACE
|
||||
-- glCullFace GL_BACK
|
||||
glUseProgram (pdata ^. lightingWallShadShader . shadName)
|
||||
glUniform3f (pdata ^?! lightingWallShadShader . shadUnis' . ix 0) vfx vfy 20
|
||||
glUniform1f (pdata ^?! lightingWallShadShader . shadUnis' . ix 1) 100
|
||||
@@ -139,7 +137,7 @@ doDrawing' win pdata u = do
|
||||
glUseProgram (_shadName fs)
|
||||
glBindVertexArray $ fs ^. shadVAO . vaoName
|
||||
glDrawElements
|
||||
(marshalEPrimitiveMode $ _shadPrim' $ fs)
|
||||
(marshalEPrimitiveMode $ _shadPrim' fs)
|
||||
(fromIntegral nIndices)
|
||||
GL_UNSIGNED_SHORT
|
||||
nullPtr
|
||||
@@ -193,9 +191,6 @@ doDrawing' win pdata u = do
|
||||
glDepthFunc GL_LEQUAL
|
||||
glDepthMask GL_FALSE
|
||||
glClearColor 0.5 0.5 0.5 0
|
||||
--glBlendFunc GL_SRC_ALPHASaturate,One)
|
||||
--blendColor $= Color4 0.5 0.5 0.5 0.5
|
||||
--glBlendFuncSeparate GL_SRC_ALPHASaturate,One) , (One,GL_ONE_MINUS_SRC_ALPHA))
|
||||
glBlendFuncSeparate GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA GL_ONE GL_ONE_MINUS_SRC_ALPHA
|
||||
withArray [GL_COLOR_ATTACHMENT0, GL_NONE] $ \ptr -> glDrawBuffers 2 ptr
|
||||
glClear GL_COLOR_BUFFER_BIT
|
||||
@@ -224,6 +219,7 @@ doDrawing' win pdata u = do
|
||||
(drawCPUShadows pdata ws)
|
||||
glColorMask GL_TRUE GL_TRUE GL_TRUE GL_TRUE
|
||||
glClearColor 0 0 0 0
|
||||
glInvalidateBufferData (pdata ^. vboShapes . vboName)
|
||||
--apply lightmap to cloud buffer
|
||||
glClearColor 0 0 0 0
|
||||
glBindFramebuffer GL_FRAMEBUFFER (_unFBO (fst (_fboCloud pdata)))
|
||||
@@ -279,7 +275,7 @@ doDrawing' win pdata u = do
|
||||
glDepthMask GL_FALSE
|
||||
glEnable GL_BLEND
|
||||
glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. isoMatUBO)
|
||||
glBindBufferBase GL_UNIFORM_BUFFER 0 (pdata ^. orthonormalMatUBO)
|
||||
renderLayer FixedCoordLayer shadV layerCounts
|
||||
renderFoldable shadV $ fixedCoordPictures u
|
||||
glDepthMask GL_TRUE
|
||||
|
||||
Reference in New Issue
Block a user