Remove list layer while poking
This commit is contained in:
+29
-29
@@ -59,24 +59,24 @@ preloadRender = do
|
||||
>>= addTexture "data/texture/charMap.png"
|
||||
-- texture shaders, no textures attached
|
||||
fsShad <- makeShader "texture/simple" [vert,frag] [2,2] TriangleStrip $ const
|
||||
[[[-1, 1],[0,1]]
|
||||
,[[ 1, 1],[1,1]]
|
||||
,[[-1,-1],[0,0]]
|
||||
,[[ 1,-1],[1,0]]
|
||||
[[-1, 1,0,1]
|
||||
,[ 1, 1,1,1]
|
||||
,[-1,-1,0,0]
|
||||
,[ 1,-1,1,0]
|
||||
]
|
||||
_ <- F.foldM (pokeShader' fsShad) [RenderConst] -- fix fullscreen vertex positions now
|
||||
boxBlurShad <- makeShader "texture/boxBlur" [vert,frag] [2,2] TriangleStrip $ const
|
||||
[[[-1, 1],[0,1]]
|
||||
,[[ 1, 1],[1,1]]
|
||||
,[[-1,-1],[0,0]]
|
||||
,[[ 1,-1],[1,0]]
|
||||
[[-1, 1,0,1]
|
||||
,[ 1, 1,1,1]
|
||||
,[-1,-1,0,0]
|
||||
,[ 1,-1,1,0]
|
||||
]
|
||||
_ <- F.foldM (pokeShader' boxBlurShad) [RenderConst] -- fix fullscreen vertex positions now
|
||||
grayscaleShad <- makeShader "texture/grayscale" [vert,frag] [2,2] TriangleStrip $ const
|
||||
[[[-1, 1],[0,1]]
|
||||
,[[ 1, 1],[1,1]]
|
||||
,[[-1,-1],[0,0]]
|
||||
,[[ 1,-1],[1,0]]
|
||||
[[-1, 1,0,1]
|
||||
,[ 1, 1,1,1]
|
||||
,[-1,-1,0,0]
|
||||
,[ 1,-1,1,0]
|
||||
]
|
||||
_ <- F.foldM (pokeShader' grayscaleShad) [RenderConst] -- fix fullscreen vertex positions now
|
||||
-- background shader
|
||||
@@ -184,31 +184,31 @@ cleanUpRenderPreload pd = do
|
||||
freeShaderPointers $ _fullscreenShader pd
|
||||
|
||||
{-# INLINE pokeBezQStrat #-}
|
||||
pokeBezQStrat :: RenderType -> [[[Float]]]
|
||||
pokeBezQStrat (RenderBezQ vs) = fmap (\((x,y,z),(r,g,b,a),(s,t,u,v)) -> [[x,y,z],[r,g,b,a],[s,t,u,v]]
|
||||
pokeBezQStrat :: RenderType -> [[Float]]
|
||||
pokeBezQStrat (RenderBezQ vs) = fmap (\((x,y,z),(r,g,b,a),(s,t,u,v)) -> [x,y,z,r,g,b,a,s,t,u,v]
|
||||
)
|
||||
vs
|
||||
pokeBezQStrat _ = []
|
||||
|
||||
{-# INLINE pokeTriStrat #-}
|
||||
pokeTriStrat,pokeCharStrat,pokeArcStrat,pokeLineStrat,pokeEllStrat :: RenderType -> [[[Float]]]
|
||||
pokeTriStrat (RenderPoly vs) = fmap (\(p,co) -> [flat3 p,flat4 co]) vs
|
||||
pokeTriStrat,pokeCharStrat,pokeArcStrat,pokeLineStrat,pokeEllStrat :: RenderType -> [[Float]]
|
||||
pokeTriStrat (RenderPoly vs) = fmap (\(p,co) -> concat [flat3 p,flat4 co]) vs
|
||||
pokeTriStrat _ = []
|
||||
|
||||
pokeLightingFloorStrat :: RenderType -> [[[Float]]]
|
||||
pokeLightingFloorStrat Render1111{_unRender1111=x} = [[flat4 x]]
|
||||
pokeLightingFloorStrat :: RenderType -> [[Float]]
|
||||
pokeLightingFloorStrat Render1111{_unRender1111=x} = [flat4 x]
|
||||
pokeLightingFloorStrat _ = undefined
|
||||
|
||||
pokeCharStrat (RenderText vs) = fmap (\(a,b,c) -> [flat3 a, flat4 b, flat3 c]) vs
|
||||
pokeCharStrat (RenderText vs) = fmap (\(a,b,c) -> concat [flat3 a, flat4 b, flat3 c]) vs
|
||||
pokeCharStrat _ = []
|
||||
|
||||
pokeArcStrat (RenderArc (a,b,c)) = [[flat3 a, flat4 b, flat4 c]]
|
||||
pokeArcStrat (RenderArc (a,b,c)) = [concat [flat3 a, flat4 b, flat4 c]]
|
||||
pokeArcStrat _ = []
|
||||
|
||||
pokeLineStrat (RenderLine vs) = fmap (\((x,y,z),(r,g,b,a)) -> [[x,y,z],[r,g,b,a]]) vs
|
||||
pokeLineStrat (RenderLine vs) = fmap (\((x,y,z),(r,g,b,a)) -> [x,y,z,r,g,b,a]) vs
|
||||
pokeLineStrat _ = []
|
||||
|
||||
pokeEllStrat (RenderEllipse vs) = fmap (\((x,y,z),(r,g,b,a)) -> [[x,y,z],[r,g,b,a]]) vs
|
||||
pokeEllStrat (RenderEllipse vs) = fmap (\((x,y,z),(r,g,b,a)) -> [x,y,z,r,g,b,a]) vs
|
||||
pokeEllStrat _ = []
|
||||
|
||||
vert, geom, frag :: ShaderType
|
||||
@@ -216,16 +216,16 @@ vert = VertexShader
|
||||
geom = GeometryShader
|
||||
frag = FragmentShader
|
||||
|
||||
pokeWPStrat :: RenderType -> [[[Float]]]
|
||||
pokeWPStrat Render22{_unRender22 = ((x,y),(z,w))} = [[[x,y,z,w]]]
|
||||
pokeWPStrat :: RenderType -> [[Float]]
|
||||
pokeWPStrat Render22{_unRender22 = ((x,y),(z,w))} = [[x,y,z,w]]
|
||||
pokeWPStrat _ = undefined
|
||||
|
||||
pokeWPColStrat :: RenderType -> [[[Float]]]
|
||||
pokeWPColStrat Render22x4{_unRender22x4=(((x,y),(z,w)),(r,g,b,a))} = [[[x,y,z,w],[r,g,b,a]]]
|
||||
pokeWPColStrat :: RenderType -> [[Float]]
|
||||
pokeWPColStrat Render22x4{_unRender22x4=(((x,y),(z,w)),(r,g,b,a))} = [[x,y,z,w,r,g,b,a]]
|
||||
pokeWPColStrat _ = undefined
|
||||
|
||||
poke32 :: (Point3,Point2) -> [[[Float]]]
|
||||
poke32 ((x,y,z),(a,b)) = [[[x,y,z],[a,b]]]
|
||||
poke32 :: (Point3,Point2) -> [[Float]]
|
||||
poke32 ((x,y,z),(a,b)) = [[x,y,z,a,b]]
|
||||
|
||||
pokeBGStrat :: a -> [[[Float]]]
|
||||
pokeBGStrat :: a -> [[Float]]
|
||||
pokeBGStrat = const []
|
||||
|
||||
Reference in New Issue
Block a user