Bloom lamps, commit before unifying wall points vbo

This commit is contained in:
2021-07-11 14:34:10 +02:00
parent 50295daeba
commit 5e21a6527d
4 changed files with 17 additions and 18 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ lamp h = defaultInanimate
lampPic :: Float -> Picture
lampPic h = pictures
[ pictures . map (Poly3D 0 . map ((, blue) . (-.-.- (2.5,2.5,0)))) $ boxXYZ 5 5 (h-1)
, setDepth h $ color white $ circleSolid 3
, setLayer 1 $ setDepth h $ color white $ circleSolid 3
]
initialiseLamp :: Float -> CRUpdate
+4 -7
View File
@@ -98,8 +98,8 @@ doDrawing pdata w = do
blendFunc $= (One,Zero)
--textureBinding Texture2D $= Just (snd $ _fboFourth1 pdata)
drawShader (_bloomBlurShader pdata) 4
blendFunc $= (One,Zero)
replicateM_ 5 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
--blendFunc $= (One,Zero)
replicateM_ 3 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
--replicateM_ 5 $ pingPongBlur pdata
--blend $= Enabled
viewport $= (Position 0 0, Size (round $ fst wins) (round $ snd wins))
@@ -113,14 +113,9 @@ doDrawing pdata w = do
colorMask $= Color4 Enabled Enabled Enabled Enabled
clearColor $= Color4 0 0 0 0
bindShaderBuffers [_fullscreenShader pdata] [4]
--bindFramebuffer Framebuffer $= defaultFramebufferObject
blend $= Disabled
depthMask $= Disabled
depthFunc $= Just Always
--textureBinding Texture2D $= Just (snd $ head $ fst $ _fbos pdata)
--drawShader (_fullscreenShader pdata) 4
bindFramebuffer Framebuffer $= (fst $ _fboBase pdata)
--drawShader (_fullscreenShader pdata) 4
@@ -136,6 +131,8 @@ doDrawing pdata w = do
--textureBinding Texture2D $= Just (snd3 $ _fbo2 pdata)
textureBinding Texture2D $= Just (snd $ _fboFourth1 pdata)
drawShader (_fullscreenShader pdata) 4
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
drawShader (_fullscreenShader pdata) 4
depthFunc $= Just Lequal
_ <- renderFoldable pdata $ picToLTree (Just 2) pic