I already have a forum post in Unity's forum that contains most of the details and code regarding the problem I'm having so look at that one first.
So basically, I'm trying to write my own custom Cook-Torrance shader in Unity using Cg language. When I finished writing it up, the result shows a weird split halfway down the sphere where the first half looks correct and the second half being completely black. I don't know what's causing this weird visual glitch so I'm posting this here in case someone knows an answer.
I'm using Trowbridge-Reitz for Distribution, Schlick-GGX for Geometric and Schlick approximation for Fresnel.
You can see the result in the image below. The one after the image below is an image I found in this site that shows what I expected Cook-Torrance to look like.
↧