Hi. I'm writing over the PBR shading that Ogre has, just to adapt it for my workflow.
I'm curious about the data that the PBR shader receives.
Using HLMS (http://wiki.ogre3d.org/HLMS+Materials), when I assign, for example, a diffuse color and specular color, these values are sRGB, right?.
But the PBR shader receives a lineal value?, in some part Ogre do the conversion, right? to apply it in the BRDF calculation.
The same hapen with texture in sRGB, correct?.
Regards.
Eduardo
Simple question about color space.
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Simple question about color space.
It's not properly documented, I'll hand you that.
It's best to think that everything is in linear space, except the diffuse textures which are expected to be loaded as sRGB so the GPU performs the conversion for us to linear space. If the texture was not loaded as sRGB, then the texture must be already in linear space.
We output linear values as well; but if the output target is in sRGB format, the GPU will convert the output to sRGB automatically for us and display it properly on screen.
It's best to think that everything is in linear space, except the diffuse textures which are expected to be loaded as sRGB so the GPU performs the conversion for us to linear space. If the texture was not loaded as sRGB, then the texture must be already in linear space.
We output linear values as well; but if the output target is in sRGB format, the GPU will convert the output to sRGB automatically for us and display it properly on screen.