-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Support non-sRGB texture formats #3903
Conversation
Having it as a feature would mean that you will have to distribute several different versions of your binaries depending on your gpu on wayland... would it be possible to detect at runtime? |
Possibly, though having the option of disabling it entirely should make it work regardless of GPU. I was discussing this in the official Discord under #rendering-dev, see here. I personally don't have the experience to implement this, and it seems like a large undertaking, so I was hoping this is a viable workaround in the meantime. |
Should it be enabled automatically with the Sorry, I have zero knowledge of wayland, but I would like to avoid needing to enable several non-obvious features to support most cases. |
Could you also mention the new feature in https://github.com/bevyengine/bevy/blob/main/docs/cargo_features.md? |
I think we should ask wgpu what the preferred texture format for the surface is and act based on that. |
Done! Thanks for the heads up |
It's usually fine on Wayland in general, at least in my experience. Seems like Nvidia is the only case where this doesn't work; wayland with sRGB is perfectly okay on my Intel iGPU, at least. |
Objective
Enables a workaround for #3897 by setting a
no_srgb
feature. Should allow native Wayland support on systems that may not support sRGB directly e.g. (some video cards) Nvidia on Wayland presently.Solution
Gamma correction is enabled conditionally based on whether the feature is enabled.