Work on textures and lighting
This commit is contained in:
+4
-4
@@ -10,7 +10,7 @@ module Shader.Poke (
|
||||
|
||||
import Geometry.Vector
|
||||
import Dodge.Data.Wall
|
||||
import Shader.Poke.Triangulate
|
||||
import Geometry.Triangulate
|
||||
import Control.Monad.Primitive
|
||||
import qualified Data.Vector as V
|
||||
import qualified Data.Vector.Fusion.Stream.Monadic as VFSM
|
||||
@@ -257,7 +257,7 @@ pokeIndex nv eiptr ni ioff = do
|
||||
memoFlatIndices :: V.Vector (UV.Vector Int)
|
||||
memoFlatIndices =
|
||||
V.generate 10 $
|
||||
UV.fromList . concatMap triangulate . boxSurfaces' . (+ 3)
|
||||
UV.fromList . concatMap polyToTris . boxSurfaces' . (+ 3)
|
||||
|
||||
memoTopPrismIndices :: V.Vector (UV.Vector Int)
|
||||
{-# INLINE memoTopPrismIndices #-}
|
||||
@@ -313,8 +313,8 @@ boxEdgeIndices n = concatMap f [0 .. n -1]
|
||||
cylinderIndices :: Int -> [Int]
|
||||
cylinderIndices n =
|
||||
cylinderRoundIndices n
|
||||
++ triangulate [2 * n, 2 * n + 2 .. 4 * n - 1]
|
||||
++ triangulate [2 * n + 1, 2 * n + 3 .. 4 * n - 1]
|
||||
++ polyToTris [2 * n, 2 * n + 2 .. 4 * n - 1]
|
||||
++ polyToTris [2 * n + 1, 2 * n + 3 .. 4 * n - 1]
|
||||
|
||||
cylinderRoundIndices :: Int -> [Int]
|
||||
cylinderRoundIndices n =
|
||||
|
||||
Reference in New Issue
Block a user