SpiderPig Posted May 22 Share Posted May 22 @klepto2 and I had a discussion on discord about the Tone Mapping post effect blurring the result. It's really easy to tell if you load these images in Microsoft paint and zoom into a particular section. You'll see that the pixels have defiantly been blurred with the post effect. Not sure if this is just Nvidia or not. I'm using a GTX 980 TI. I fixed the blur by changing this: vec2 coord = ivec2(gl_FragCoord.x, gl_FragCoord.y) / vec2(DrawViewport.z, DrawViewport.w); To this: vec2 coord = vec2(gl_FragCoord.x, gl_FragCoord.y) / vec2(DrawViewport.z, DrawViewport.w); Klepto also suggest this might be better: void main() { ivec2 coord = ivec2(gl_FragCoord.x, gl_FragCoord.y); outColor = texelFetch(ColorBuffer, coord,0); outColor.rgb = aces(outColor.rgb); } Before: After: Also you may notice that when the post effect is applied Framebuffer::Capture() no longer get's the stuff from the 2nd UI camera... that may be another bug report though. Quote Link to comment Share on other sites More sharing options...
Solution klepto2 Posted May 22 Solution Share Posted May 22 small correction: void main() { ivec2 coord = ivec2(gl_FragCoord.x, gl_FragCoord.y); outColor = texelFetch(ColorBuffer, coord,gl_SampleID); outColor.rgb = aces(outColor.rgb); } this also uses the sampleID, which might be better in this case. 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted May 22 Share Posted May 22 6 hours ago, klepto2 said: this also uses the sampleID, which might be better in this case. In earlier builds, yes. In more recent builds I changed it so the MSAA resolve happens at the beginning of the post-processing chain. The reason for this is that the depth buffer is the only texture that really needs to retain its full resolution, and the shaders can access that anyways, so only depth-based effects need to worry about this. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.