Add trail to bloom
This commit is contained in:
@@ -47,6 +47,10 @@ preloadRender = do
|
||||
cslist <- makeShader "twoD/character" [vert,frag] [3,4,2] ETriangles pokeCharStrat
|
||||
>>= addTexture "data/texture/charMap.png"
|
||||
basicTweakZShad <- makeShader "twoD/basicTweakZ" [vert,frag] [4,4] ETriangles pokeTriTweakZ
|
||||
-- fullscreen shaders
|
||||
fullscreenAlphaHalveShad <- makeShader "fullscreen/alphaHalve" [vert,frag] [2] ETriangleStrip $
|
||||
const cornerListNoCoord
|
||||
pokeArray (_vboPointer $ _vaoVBO $ _shaderVAO fullscreenAlphaHalveShad) $ concat cornerListNoCoord
|
||||
-- texture shaders, no textures attached
|
||||
fsShad <- makeShader "texture/simple" [vert,frag] [2,2] ETriangleStrip $ const cornerList
|
||||
-- note we directly poke the shader vertex data here
|
||||
@@ -103,6 +107,7 @@ preloadRender = do
|
||||
, _textureShader = textShad
|
||||
, _textureArrayShader = textArrayShad
|
||||
, _fullscreenShader = fsShad
|
||||
, _fullscreenAlphaHalveShader = fullscreenAlphaHalveShad
|
||||
, _boxBlurShader = boxBlurShad
|
||||
, _grayscaleShader = grayscaleShad
|
||||
, _spareFBO = fbo
|
||||
@@ -125,6 +130,13 @@ cornerList =
|
||||
,[-1,-1,0,0]
|
||||
,[ 1,-1,1,0]
|
||||
]
|
||||
cornerListNoCoord :: [[Float]]
|
||||
cornerListNoCoord =
|
||||
[[-1, 1]
|
||||
,[ 1, 1]
|
||||
,[-1,-1]
|
||||
,[ 1,-1]
|
||||
]
|
||||
--------------------end preloadRender
|
||||
|
||||
setupFramebufferWithStencil :: IO (FramebufferObject, TextureObject,RenderbufferObject)
|
||||
|
||||
Reference in New Issue
Block a user