Experiment with bloom
This commit is contained in:
+17
-2
@@ -77,8 +77,22 @@ doDrawing pdata w = do
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 3) pic
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 4) pic
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 5) pic
|
||||
|
||||
depthMask $= Enabled
|
||||
bindFramebuffer Framebuffer $= (fst3 $ _fbo3 pdata)
|
||||
clear [ColorBuffer]
|
||||
bindFramebuffer Framebuffer $= (fst3 $ _fbo2 pdata)
|
||||
depthFunc $= Just Always
|
||||
--blend $= Disabled
|
||||
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
|
||||
clear [ColorBuffer]
|
||||
--blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
blendFunc $= (One,Zero)
|
||||
bindShaderBuffers [_boxBlurShader pdata] [4]
|
||||
drawShader (_boxBlurShader pdata) 4
|
||||
pingPongBlur pdata
|
||||
--blend $= Enabled
|
||||
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
|
||||
bindFramebuffer Framebuffer $= (fst $ _fboLighting pdata)
|
||||
let scPol = screenPolygon w
|
||||
@@ -106,7 +120,8 @@ doDrawing pdata w = do
|
||||
blendFunc $= (Zero, OneMinusSrcAlpha)
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
blendFunc $= (SrcAlpha, OneMinusSrcAlpha)
|
||||
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
|
||||
--textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
|
||||
textureBinding Texture2D $= Just (snd3 $ _fbo2 pdata)
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
|
||||
depthFunc $= Just Lequal
|
||||
|
||||
Reference in New Issue
Block a user