Fix color representation for texture in example #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm a bit over my head here but it seems like dear imgui expects colours to come in linear rgb space, so when we need to load textures we need to override the deafault
Repr
which is set toSrgb
.Does this mean if I want to use a texture in rendy and in dear imgui I need to load it twice? Once with
Srgb
for rendy and once withUnorm
for dear imgui. I think this memory inefficient but computationally fast, so it's probably the right choice for now. However it does seem like there are some open discussions and even a PR for allowing dear imgui to work directly with srgb, if that gets resolved then there might be a away to use a single texture handle for both rendy and dear imgui.Before:
After: