Archived

This topic is now archived and is closed to further replies.

MarcusMaximus

Finding the color of the first object along a vector

Recommended Posts

If you have seen my post in the math/physics forum, you know I am designing a water tutorial and am trying to get the environment its in to reflect off the water. I''m in the final stages of making an algorithm for doing this but I need to be able to do one more thing. Basically I have a vector that has been reflected off of the water that originally came from the origin. Now I need to know if there is a way to find the color of the first object the reflected vector hits so I can make the surface in that section of the water that color. Is there a way to do this? I remember in nehe''s shadow casting tutorial the designer used clipping to cast a color in the first region struck by the vector of the shadow. This seems similar to what I''m trying to do but in reverse. Thanks for your help. -Mark

Share this post


Link to post
Share on other sites