Hi guys
So, the problem:
Cook-Torrance calculations inside "surface" material domain works fine. I doesnt see any problem or artifacts.
In case of "surface" domain, all normal or "N" calculations are taking from normal map transformed from tangent space to world space and then normalized.
Calculations of same shader inside "post-process" material domain leads me to some artifacts. In this case i just taking normalized SceneTexture:WorldNormal as my "N" input for the shader.
Here's some pics:
Notice area which are marked as "Lit". Its correct cause surface normal in those point are defenitely more or less look straight to light source.
Not i move my camera a bit:
Notice how area which still should be lit became black.
Also you can notice wierd lit pixels bwetween those concrete slabs, bt its also doesnt correct.
Because in "surface" domain it works fine and those artifacts doesnt appear, i guess what this is a problem with SceneTexture:WorldNormal.
But im not sure how to solve that.
Shader code:
https://learnopengl.com/PBR/Theoryhttps://nccastaff.bournemouth.ac.uk/jmacey/OpenGL/shaders/PBR/pbr.html
Replies
I just forgot about "max" for "denom" in final stages.