• Advertisement
Sign in to follow this  

Opacity Shadow Map

This topic is 4147 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

hi guys! With regards to the eqn found in GPU GEMS 2, Opacity(Z) = { Opacity(Zi)(Z - Zi) + Opacity(Zi+1)(Zi+1 - Z) } / (Zi+1 - Zi) I understand that additive blending is done to accumulate with the previous opacity results, but how do you relate Opacity(Zi) and Opacity(Zi+1) in the eqn to the blending stages? thx! Edwin

Share this post


Link to post
Share on other sites
Advertisement
Hey. Sorry if the chapter was unclear.

Opacity(Zi) is a sum over all the fragments in the hair which are closer than Zi.
So what we did was to render the whole hair, and use a shader to set each fragment's contribution to zero if it is farther than the specified z-value.

This gives us Opacity(Zi) - we can then compute Opacity(Z) using the formula you described, or using the code under the heading "Performing a Lookup".

Share this post


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

  • Advertisement