Working (but slow) shadow shapes

This commit is contained in:
2021-09-17 23:12:51 +01:00
parent 294e01479a
commit 6ac53c052c
16 changed files with 167 additions and 60 deletions
+2 -2
View File
@@ -9,7 +9,6 @@ import Dodge.Config.Data
import Dodge.Base.Window
import Dodge.Render.Picture
--import Dodge.Creature.ShadowBox
import Dodge.Creature.Silhouette
import Dodge.Render.Shape
import Geometry
import Render
@@ -57,11 +56,12 @@ doDrawing pdata w = do
-- poke wall points and colors
nWalls <- poke224s (shadVBOptr $ _wallTextureShader pdata) wallPointsCol
nSils <- pokePoint3s (shadVBOptr $ _lightingLineShadowShader pdata)
$ creatureSilhouettes w
$ (_shEdges $ worldShape w)
++ _foregroundEdgeVerx w
-- poke foreground geometry for caps
nCaps <- pokePoint3s (shadVBOptr $ _lightingCapShader pdata)
$ concatMap polyToGeoRender (foregroundPics w)
++ map _svPos (_shVertices $ worldShape w)
-- bind wall points, silhouette data, surface geometry
uncurry bindShaderBuffers $ unzip
[ ( _wallTextureShader pdata, nWalls)