Creature shadow test

This commit is contained in:
2021-08-28 20:42:20 +01:00
parent f977742f06
commit 55f1d89a5e
6 changed files with 26 additions and 8 deletions
+4 -2
View File
@@ -8,6 +8,7 @@ import Dodge.Data
import Dodge.Config.Data
import Dodge.Base.Window
import Dodge.Render.Picture
import Dodge.Creature.ShadowBox
import Geometry
import Render
import Data.Preload.Render
@@ -52,11 +53,12 @@ doDrawing pdata w = do
-- poke wall points and colors
nWalls <- poke224s (shadVBOptr $ _wallTextureShader pdata) wallPointsCol
nSils <- pokePoint3s (shadVBOptr $ _lightingLineShadowShader pdata)
(_foregroundEdgeVerx w)
$ youSil w ++ _foregroundEdgeVerx w
-- poke foreground geometry and floor
let addC (V2 xx yy) = V3 xx yy 0
nsurfVs <- pokePoint3s (shadVBOptr $ _lightingSurfaceShader pdata)
$ polyToTris (map addC $ screenPolygon w)
$ youBox w
++ polyToTris (map addC $ screenPolygon w)
++ concatMap polyToGeoRender (foregroundPics w)
-- bind wall points, silhouette data, surface geometry
uncurry bindShaderBuffers $ unzip