the_lab_renderer
the_lab_renderer copied to clipboard
Still Uses Phong Shading and Not GGX
It appears that the lighting model in the shaders is based off of the phong lighting that Unity had at the time The Lab Renderer was created. Unity now has the more physically correct GGX lighting which is crucial when working with PBR in things like Substance Painter, as a lack of consistency makes it impossible to make things look right. Is there any way to use GGX with this renderer?
That's intentional, Phong shading is much cheaper than GGX. GGX would not be optimal for VR. However it wouldn't take much to switch from Phong to GGXto test for your self. As for consistency issues, they should be fairly minimal as this is still a pbr based renderer.
I know it was intentional, especially since that's what Unity used at the time, but the consistency issues are too much unless the assets are designed specifically for it. I've been trying to switch from Phong to GGX, but still haven't been able to find exactly where in the code to do that. It seems that the functions that affect the lighting are quite spread out.
shaders/vr_lighting ComputeDiffuseAndSpecularTerms is the function your looking for, It computes both diffuse and specular terms.