J.I. Styles
Newcomer
Hi, first post in these parts. I'm a professional games artist, and I've been playing with hlsl for quite a few months now -- so far I've made a skin shader I'm happy enough with to release publicly which you can find on my site here.
The translucency/SSS effect in that skin shader is a cheapy kludge, so I want to go one better. To do that I'll need to author a thickness shader. The thing I'm stuck on is how to determine the depth on a per pixel or vertex level.
I'm thinking I'll need to cast a ray from all the back facing polys along the light vector, and test when it intersects a front facing poly, then record the distance. I've no idea how to implement ray casts like this in code however. If someone could point me in the right direction, I'd be very grateful
cheers!
-Joel
http://www.jistyles.com
The translucency/SSS effect in that skin shader is a cheapy kludge, so I want to go one better. To do that I'll need to author a thickness shader. The thing I'm stuck on is how to determine the depth on a per pixel or vertex level.
I'm thinking I'll need to cast a ray from all the back facing polys along the light vector, and test when it intersects a front facing poly, then record the distance. I've no idea how to implement ray casts like this in code however. If someone could point me in the right direction, I'd be very grateful
cheers!
-Joel
http://www.jistyles.com