Skip to content
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

nannou_egui colours too light / incorrect gamma handling #958

Open
mitchmindtree opened this issue Jan 21, 2024 · 2 comments
Open

nannou_egui colours too light / incorrect gamma handling #958

mitchmindtree opened this issue Jan 21, 2024 · 2 comments
Labels

Comments

@mitchmindtree
Copy link
Member

#940 lands an epic final stable release of nannou prior to diving into the Great Bevy Refactor #953. However unfortunately, a recent version of egui changed some assumptions about the colour format of the egui pipeline's target texture, and the required changes are a little more than we can afford time for at the moment.

From memory, the issue has something to do with egui's fragment shader and some assumptions they make around web targets vs desktop targets. nannou uniquely runs into this as we don't target the window surface texture directly (which is normally sRGB, i.e. gamma adjusted) like most egui apps do - instead we draw to an intermediary frame with a linear colour format.

There are no direct plans for fixing nannou_egui under the 0.19 release - instead, as a part of #953, the plan is to take advantage of and collaborate with the existing bevy_egui plugin. We may run into similar issues if bevy_egui makes similar assumptions to egui itself w.r.t. target textures, however even so we're likely better off upstreaming a solution to bevy_egui than continuing to maintain our own egui rendering implementation.

@tychedelia
Copy link
Collaborator

tychedelia commented Jan 23, 2024

Interestingly bevy_egui seems to do this conversion in the opposite direction. As far as I can tell, they're rendering into the window swap chain provided by bevy.

@mitchmindtree
Copy link
Member Author

Going to remove this from the bevy plugin rework, as I think the new plan is to just use bevy_egui instead of nannou_egui altogether.

Feel free to re-add if I'm mistaken!

If not, will close this after we land the rework as nannou_egui will no longer be a thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants