From a98ec80f59154da1e3dea339c7b9bc1f7f09dc82 Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 1 Oct 2024 00:37:31 +0100 Subject: [PATCH] Remove bottom and mid layer pictures --- src/Picture/Data.hs | 6 +++--- src/Shader/Bind.hs | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Picture/Data.hs b/src/Picture/Data.hs index a2a71430e..45812c1fb 100644 --- a/src/Picture/Data.hs +++ b/src/Picture/Data.hs @@ -20,9 +20,9 @@ data Verx = Verx deriving (Eq, Ord, Show, Read) --Generic, Flat) data Layer - = BottomLayer - | MidLayer - | BloomLayer +-- = BottomLayer +-- | MidLayer + = BloomLayer | BloomNoZWrite | DebugLayer | FixedCoordLayer diff --git a/src/Shader/Bind.hs b/src/Shader/Bind.hs index 414d47d42..1c530e7fa 100644 --- a/src/Shader/Bind.hs +++ b/src/Shader/Bind.hs @@ -4,6 +4,7 @@ module Shader.Bind ( bufferEBO, ) where +import Picture.Data import Control.Lens import Control.Monad.Primitive import qualified Data.Vector.Fusion.Stream.Monadic as VFSM @@ -38,10 +39,11 @@ bufferShaderLayers shads counts = MV.imapM_ f shads f i shad = do let theVBO = snd shad stride = _vboVertexBytes theVBO `div` floatSize - VFSM.mapM_ (g stride theVBO) $ VFSM.enumFromStepN 0 1 6 -- [0..5] + --VFSM.mapM_ (g stride theVBO) $ VFSM.enumFromStepN 0 1 6 -- [0..5] + VFSM.mapM_ (g stride theVBO) $ VFSM.enumFromStepN 0 1 numLayers -- [0..5] where g stride theVBO lay = do - numVs <- UMV.unsafeRead counts $ lay * 6 + i + numVs <- UMV.unsafeRead counts $ lay * numLayers + i glNamedBufferSubDataH (_vboName theVBO) (fromIntegral $ floatSize * stride * numSubElements * lay)