Fix bug involving number of foreground vertices rendered

This commit is contained in:
jgk
2021-06-30 00:59:58 +02:00
parent 357206f060
commit 1cfd1663d1
2 changed files with 15 additions and 12 deletions
+2 -8
View File
@@ -61,17 +61,11 @@ doDrawing pdata w = do
-- set the coordinate uniform ready for drawing elements using world coordinates
bufferUBO $ perspectiveMatrixb rot camzoom trans wins viewFroms
-- store floor position into buffer
let addC (xx,yy) = (xx,yy,0)
nsurfVs <- F.foldM (pokeShader (_lightingSurfaceShader pdata))
$ [Render3 $ polyToTris $ map addC $ screenPolygon w ]
++ concatMap polyToGeoRender (foregroundPics w)
bindShaderBuffers [_lightingSurfaceShader pdata] [nsurfVs]
depthFunc $= Just Less
let scPol = screenPolygon w
-- draw the lightmap. Probably changes the bound framebufferObject
createLightMap pdata (w ^. config . shadow_resolution) wallPoints lightPoints viewFroms
(foregroundPics w)
(foregroundPics w) scPol
clear [DepthBuffer]
depthFunc $= Just Less
-- set blending to depend upon the alpha level already present