I'm learning shader forge and am following a tutorial. The tutorial is a little out of date but I think I'm following it okay.
Here's what I think I'm supposed to make:
Obviously it's not coming out correctly. I don't know why though. I did this tutorial about a year ago and it came out pretty much okay (there was one weird error but it looked close enough).
This on the other hand looks nothing like what I see in the video. But the nodes look like they're set up the same. What am I missing?
I posted on the official Unity forum thread for Shader Forge and was directed to an alternative approach to doing a BRDF shader. This is what I came out with:
It looks more correct but it isn't set up to react to light attenuation, it doesn't show the full range of color in the ramp texture, and furthermore, I'm not really clear on why the first one didn't work? I want to make sure I'm understanding what I'm doing incorrectly, and not just copying what I see on forums. Any insight?
Replies
Anyway it's working now mostly!
Her'es what it should look like:
The only remaining problem is that the shading seems mirrored from the center of the sphere.... not sure why. I've tried checking all the dot products but they're all set to positive. So what could be causing that?
The one I found on the Unity forum uses half view direction instead of view direction, but that shouldn't be the issue since view direction is sampled for spectacular/rim lighting not for shading. Anyone have a clue why it's doing this?