Try to add compute shaders
This commit is contained in:
@@ -15,6 +15,7 @@ pokeCloud vptr iptr (nv,ni) cl = do
|
||||
return (nv + 4, ni + 6)
|
||||
|
||||
pokeCloudVerx :: Ptr Float -> Cloud -> Int -> Int -> (Float, Float) -> IO ()
|
||||
{-# INLINE pokeCloudVerx #-}
|
||||
pokeCloudVerx ptr cl nv i (dx, dy) =
|
||||
UV.imapM_ (pokeCloudFloat ptr (nv + i)) $ UV.fromList
|
||||
[x, y, cz, 1, r, g, b, a, cx, cy, cz, rad, dx, dy, 0, 0]
|
||||
@@ -26,7 +27,9 @@ pokeCloudVerx ptr cl nv i (dx, dy) =
|
||||
a = a' * min 1 (fromIntegral (_clTimer cl) / fadet)
|
||||
|
||||
pokeCloudFloat :: Ptr Float -> Int -> Int -> Float -> IO ()
|
||||
{-# INLINE pokeCloudFloat #-}
|
||||
pokeCloudFloat ptr nv i = pokeElemOff ptr (nv * 16 + i)
|
||||
|
||||
pokeCloudIndex :: Ptr GLushort -> Int -> Int -> Int -> Int -> IO ()
|
||||
{-# INLINE pokeCloudIndex #-}
|
||||
pokeCloudIndex ptr nv ni ioff voff = pokeElemOff ptr (ni + ioff) (fromIntegral $ nv + voff)
|
||||
|
||||
Reference in New Issue
Block a user