Forum Discussion
ox
9 years agoHonored Guest
sRGB/gamma/color whoes, conversion from PSVR to CV1
Ok this may seem a bit "unusual" question but, I am working on a title currenty on work for PSVR ( PS4 ) and currently having it working as well on PC / CV1, all in house propietary engine so "all cod...
volgaksoy
9 years agoExpert Protege
OX, I don't know how the PSVR system works, and I don't know how far off things look for you. Do you know what the gamma profile for the PSVR display is? Is it sRGB, or something else? I'm not personally asking for an answer here, but you should be aware of these things when making sure the PSVR & CV1 visuals look comparable. I can give you some insight on how things are supposed to work.
This is perhaps going to sound a bit confusing at first, but here it goes. The Oculus compositor expects all eye textures to be rendered into in linear space *from the GPU shader's point-of-view*. By that we mean that when the formats are set up correctly, even an sRGB texture is actually linear when you sample from it and write to it as a render target in your shader. FP16 formats are linear as well. Note that you actually do NOT want to use OVR_FORMAT_R8G8B8A8_UNORM because while that's a linear format, its bit are not distributed nicely enough to provide band-free rendering when it's displayed on a perceptually-linear display (e.g. sRGB or gamma 2.2).
If you have done your rendering using R8G8B8A8_UNORM, then you would want to emulate some form of gamma correction (e.g. pow(2.2)). So I would hope that the lighting math in your shader was modified to be gamma-aware. Similarly, you would make sure that the output is applying some form of gamma curve such as pow(1.0/2.2) on the output color. If that's something that you don't care about perhaps you actually have no dynamic lighting, then it might be OK.
When everything is said and done, the Oculus compositor actually applies color correction to the incoming eye textures to make sure the luminance response is along the lines of what is expected regardless of what the display panel would have done as a "dumb pass-thru" display.
This is perhaps going to sound a bit confusing at first, but here it goes. The Oculus compositor expects all eye textures to be rendered into in linear space *from the GPU shader's point-of-view*. By that we mean that when the formats are set up correctly, even an sRGB texture is actually linear when you sample from it and write to it as a render target in your shader. FP16 formats are linear as well. Note that you actually do NOT want to use OVR_FORMAT_R8G8B8A8_UNORM because while that's a linear format, its bit are not distributed nicely enough to provide band-free rendering when it's displayed on a perceptually-linear display (e.g. sRGB or gamma 2.2).
If you have done your rendering using R8G8B8A8_UNORM, then you would want to emulate some form of gamma correction (e.g. pow(2.2)). So I would hope that the lighting math in your shader was modified to be gamma-aware. Similarly, you would make sure that the output is applying some form of gamma curve such as pow(1.0/2.2) on the output color. If that's something that you don't care about perhaps you actually have no dynamic lighting, then it might be OK.
When everything is said and done, the Oculus compositor actually applies color correction to the incoming eye textures to make sure the luminance response is along the lines of what is expected regardless of what the display panel would have done as a "dumb pass-thru" display.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 months ago
- 1 month ago
- 3 months ago