In my application I’m using multisampling and sRGB conversion and until now everything worked great. But now I need to render the scene to an intermediate buffer in order to do some postprocessing, and I discovered the hard-way that multisampling does not like at all sRGB conversion.
If activate multisampling in the intermediate buffer (where the scene is rendered) and no more on the main framebuffer, the sRGB correction goes wrong and banding appears. This happens either if I activate sRGB on both the buffer and main framebuffer or if I manually do the correction in the postprocessing fragment shader.
I tried using floating point color to avoid any loss of precision, but no change.
So, can this actually work, and, if so, what is the right configuration ? or is it a bug in my driver or panda ? This is driving me nuts
Without MSAA :
Test code : test_srgb.zip (6.5 KB)
There are many configuration variables in the test_srgb.py but to simply change MSAA, just set multisamples_buffer to 0 or (for example) 2. The script use a modified version of the FilterManager class to modify the intermediate buffer fb properties.