Remove mipmaps from framebuffers with shared renderbuffer

This commit is contained in:
jgk
2021-07-06 16:40:01 +02:00
parent 4d7f7803e0
commit b5b2a44461
2 changed files with 6 additions and 3 deletions
+1
View File
@@ -86,6 +86,7 @@ doDrawing pdata w = do
depthFunc $= Just Always
--blend $= Disabled
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
textureFilter Texture2D $= ((Linear',Nothing) , Linear')
--clear [ColorBuffer]
--blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
--blendFuncSeparate $= ((Zero,One), (Zero,SrcAlpha))
+5 -3
View File
@@ -187,8 +187,10 @@ newFramebufferGivenStencil rboName = do
toName <- genObjectName
textureBinding Texture2D $= Just toName
texImage2D Texture2D NoProxy 0 RGBA8 (TextureSize2D 800 600) 0 (PixelData RGBA UnsignedByte nullPtr)
textureFilter Texture2D $= ((Linear',Just Linear') , Linear')
generateMipmap' Texture2D
-- don't need mipmaps
textureFilter Texture2D $= ((Linear',Nothing) , Linear')
--textureFilter Texture2D $= ((Linear',Just Linear') , Linear')
--generateMipmap' Texture2D
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D toName 0
framebufferRenderbuffer Framebuffer DepthStencilAttachment Renderbuffer rboName
fboStatus <- framebufferStatus Framebuffer
@@ -207,8 +209,8 @@ setupTextureFramebuffer x y = do
textureBinding Texture2D $= Just fboTO
texImage2D Texture2D NoProxy 0 RGBA8 (TextureSize2D x y) 0 (PixelData RGBA UnsignedByte nullPtr)
--textureFilter Texture2D $= ((Linear',Just Linear') , Linear')
textureFilter Texture2D $= ((Nearest,Nothing) , Nearest)
--textureFilter Texture2D $= ((Linear',Nothing) , Linear')
textureFilter Texture2D $= ((Linear',Nothing) , Nearest)
--textureFilter Texture2D $= ((Nearest,Just Nearest) , Nearest)
--generateMipmap' Texture2D
framebufferTexture2D Framebuffer (ColorAttachment 0) Texture2D fboTO 0