Pre-Integrated Skin Shader

Started by
1 comment, last by Hodgman 11 years, 2 months ago

I'm trying to implement this shader I saw here, but it is giving me problems.

Here is the lookup texture I generated: link

And when I generate my lighting value by looking up (N.L, 1.0) I expect to get the equivelent of normal lambert diffuse, but instead I get this: link

It doesn't even come close to lighting the entire hemisphere, and I can't figure out why.

Advertisement

Ok, I multiplied and offset N.L by 0.5 and it seem to work. I could have sworn I tried that already and got bad results. huh.png

Seeing that the transition from unlit to lit occurs 50% of the way across your texture, I'd guess that your tex-coord should take the -1 to +1 range of N.L into account -- e.g. (N.L*0.5+0.5, 1.0)

Edit: ninja'd me ph34r.png

This topic is closed to new replies.

Advertisement