Jump to content
  • Advertisement
Sign in to follow this  
Chris_F

Pre-Integrated Skin Shader

This topic is 2090 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Edited by Hodgman

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!