New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drawing to RenderTexture with sRGB conversion enabled results in banded colors #1092
Comments
@binary1248 will have to confirm this, but this is most likely because the render-texture's OpenGL context is not configured for sRGB. This bug should go away once render-textures stop using their own context (which is planned, right?). |
This doesn't have anything to do with the way contexts are created. Whether sRGB conversion takes place is determined solely by the texture storage format or the final (window) framebuffer configuration. The "bug" in this case is merely the lack of a getter/setter to enable sRGB storage on the texture that the RenderTexture uses as its target. This should be fixed with #1093. |
This did fix the banding, but now the output differs from when rendering directly to the window, or with sRGB conversion disabled. I'm not sure if this is the expected result or not, I've added some images to the thread if you'd like to take a look. |
I have a feeling that this has something to do with precision loss during the conversion. Maybe the texture format that the RenderTexture uses in this case just isn't "good" enough. I'll have to investigate further. |
@Fewes let us know if you encounter any additional errors when using the latest master branch revision |
Window sRGB capability is turned on and the texture is loaded with sRGB conversion.
See this thread for more details and code example to reproduce: http://en.sfml-dev.org/forums/index.php?topic=20358.0
The text was updated successfully, but these errors were encountered: