Jump to content

  • Log In with Google      Sign In   
  • Create Account

Pre-Integrated Skin Shader


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Chris_F   Members   -  Reputation: 2461

Like
0Likes
Like

Posted 27 January 2013 - 10:21 PM

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.



Sponsor:

#2 Chris_F   Members   -  Reputation: 2461

Like
0Likes
Like

Posted 27 January 2013 - 11:10 PM

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



#3 Hodgman   Moderators   -  Reputation: 31799

Like
0Likes
Like

Posted 27 January 2013 - 11:11 PM

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, 27 January 2013 - 11:11 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS