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

Fix wrong color space #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YouSafe
Copy link
Contributor

@YouSafe YouSafe commented Apr 6, 2024

Since emilk/egui#2071 integrators of egui are prompted to do all color operations in gamma space. This PR achieves that by:

  • Changing the format of the texture_image to R8G8B8A8_SRGB
  • Removing the conversion of the colour in the vertex shader from srgb to linear
  • Applies a conversion of the texture sample back to gamma space (since shaders perform an automatic conversion to linear space if the sampled image is an SRGB image)

Before:
grafik

After:
grafik

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

Successfully merging this pull request may close these issues.

1 participant