Tweak drawing parameters

This commit is contained in:
jgk
2021-06-25 18:43:45 +02:00
parent 06a92e70ee
commit 726cd425f2
8 changed files with 36 additions and 31 deletions
+8 -1
View File
@@ -11,7 +11,7 @@ import Dodge.Base
--import Dodge.Render.MenuScreen
import Dodge.Render.Picture
--import Dodge.Render.PerspectiveMatrix
--import Geometry
import Geometry
import Geometry.Data
--import Picture
import Picture.Render
@@ -59,6 +59,13 @@ 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.1)
nsurfVs <- F.foldM (pokeShader (_lightingSurfaceShader pdata)) [Render3
$ polyToTris $ map addC $ screenPolygon w ]
bindShaderBuffers [_lightingSurfaceShader pdata] [nsurfVs]
depthFunc $= Just Less
-- draw the lightmap. Probably changes the bound framebufferObject
createLightMap pdata (w ^. config . shadow_resolution) wallPoints lightPoints viewFroms