Move towards geometry instancing for shadows

This commit is contained in:
2023-03-10 13:55:41 +00:00
parent cda7116930
commit c8b256c939
14 changed files with 303 additions and 17 deletions
+3 -1
View File
@@ -162,13 +162,15 @@ topPrismIndices n = concatMap f [1..n-2] -- triangles on top face
g x = [2*x,2*x+1,2*x+3
,2*x,2*x+3,2*x+2]
-- consider changing the position to a vec4
-- and just doing two pokes rather than seven
-- (especially if adding normal data)
pokeJustV :: Ptr Float
-> Int
-> ShapeV
-> IO Int
{-# INLINE pokeJustV #-}
pokeJustV ptr nv sh = do
-- pokeArray (advancePtr ptr (off 0)) [a,b,c,d,e,f,g]
pokeElemOff ptr (off 0) a
pokeElemOff ptr (off 1) b
pokeElemOff ptr (off 2) c