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

Document requirement that textures need to use an sRGB texture format #6

Open
Moguri opened this issue Mar 12, 2020 · 0 comments
Open

Comments

@Moguri
Copy link
Owner

Moguri commented Mar 12, 2020

The PBR shader assumes that it can ready texture data as linear data (i.e., that an sRGB texture format is used and the hardware is doing an sRGB to linear conversion). The tonemapping shader also does a linear to sRGB conversion. Models imported via panda3d-gltf already use an sRGB format. However, other models will not use sRGB formats by default and can look weird (washed out or too dark). This can even apply if the PBR shader is skipped (e.g., for a custom skybox shader) since the tonemapping operation will still do the linear to sRGB conversion. Some details on conversion functions can be found here (if a user wants to convert the data in a shader). This is how panda3d-gltf sets Panda textures to be sRGB.

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

No branches or pull requests

1 participant