bevyengine / bevyengine/bevy

Loading non-color maps as sRGB in `StandardMaterial` silently looks wrong

Open
#19,089 2 comments 1 reaction 0 assignees View on GitHub
A-glTF A-Rendering C-Usability D-Modest S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

With `StandardMaterial`, as far as i know any non-color maps are supported to be linear. When creating one with sRGB images (the default) it looks quite incorrect without telling the user why.

## What solution would you like?

Log a warning if sRGB maps are used where they shouldn't be. This would've saved me a lot of time tracking this down. (I only ended up discovering why because of the help of @janhohenheim, thanks!)

Considering that glTFs automatically load the relevant maps as linear, what i would *really* like is if this was done automatically when creating a `StandardMaterial`, but as far as i know we have no way of know which map a loaded image will be used for, so i think that's off the table.

## Additional Context

I was unsure whether to label this a bug or a feature request, i don't mind it being changed if it would be better considered a bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.