KhronosGroup / glTF-Sample-Viewer

Physically-Based Rendering in glTF 2.0 using WebGL
Apache License 2.0
1.27k stars 234 forks source link

BRTFLUT.png uses SRGB and it should be interpreted as linear (RGB) #79

Closed aguaviva closed 6 years ago

aguaviva commented 6 years ago

Pretty much anything that is an image (base color and also emissive) should be SRGB and the rest should be interpreted as linear (RGBA)

Also the shader should not be using SRGBtoLINEAR() for every single texture, only for the albedo and the emissive colors.

References:

emackey commented 6 years ago

We're not using SRGBtoLINEAR on every texture. The metal/rough and occlusion textures are excluded from this conversion.

There's an open question about the BRDF lookup in #64. There's also a request to upgrade the BRDF to 16-bit in #45.

Thanks for the additional references! I'm going to close this as duplicate with #64, but please do subscribe to that issue for updates on this.

aguaviva commented 6 years ago

Sounds good! BTW thanks for this great sample, I had so much fun with it! :)

ziriax commented 6 years ago

Yes, thanks for this code, it really helped us jumpstart PBR!