Make bloom trail last for at most one frame

This commit is contained in:
2021-07-07 14:52:48 +02:00
parent d939ddc731
commit 5301b6d0bd
5 changed files with 27 additions and 42 deletions
-9
View File
@@ -25,9 +25,6 @@ resizeSpareFBO xsize ysize xfull yfull pdata = do
bindFramebuffer Framebuffer $= fboName
textureBinding Texture2D $= Just fboTO
texImage2D Texture2D NoProxy 0 RGBA8 (TextureSize2D xsize' ysize') 0 (PixelData RGBA UnsignedByte nullPtr)
textureFilter Texture2D $= ((Linear',Nothing) , Nearest)
--textureFilter Texture2D $= ((Linear',Just Linear') , Nearest)
--generateMipmap' Texture2D
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D fboTO 0
bindRenderbuffer Renderbuffer $= fboRBO
@@ -57,9 +54,6 @@ resizeTextureFBO (fboName,fboTO,fboRBO) xsize ysize = do
bindFramebuffer Framebuffer $= fboName
textureBinding Texture2D $= Just fboTO
texImage2D Texture2D NoProxy 0 RGBA8 (TextureSize2D xsize' ysize') 0 (PixelData RGBA UnsignedByte nullPtr)
textureFilter Texture2D $= ((Linear',Nothing) , Nearest)
--textureFilter Texture2D $= ((Linear',Just Linear') , Nearest)
--generateMipmap' Texture2D
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D fboTO 0
bindRenderbuffer Renderbuffer $= fboRBO
@@ -91,9 +85,6 @@ resizeFBOTO (fboName,fboTO) xsize ysize = do
bindFramebuffer Framebuffer $= fboName
textureBinding Texture2D $= Just fboTO
texImage2D Texture2D NoProxy 0 RGBA8 (TextureSize2D xsize' ysize') 0 (PixelData RGBA UnsignedByte nullPtr)
textureFilter Texture2D $= ((Linear',Nothing) , Nearest)
--textureFilter Texture2D $= ((Linear',Just Linear') , Nearest)
--generateMipmap' Texture2D
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D fboTO 0
fboStatus <- framebufferStatus Framebuffer
putStrLn $ "after resize, framebuffer status:" ++ show fboStatus