Sign in to follow this  

Basic reflection vector help

This topic is 1365 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 know the formula for calculating the reflection vector given the incident and normal vector, but the example that I've seen have only been where the angle between the incident and normal vector have been < 90degrees, like so:

 

illum9d.gif

 

But what is the reflection vector if the incident vector approaches from behind the surface plane, like in my example:

10wip91.jpg

Is the reflection vector i denoted "roughly" the angle of the reflection vector?

 

Sorry if this seems like a stupid question, i just want to know what kind of reflection vector i will get if the light in my shader shines it's incident vector onto the back face of a surface.

Share this post


Link to post
Share on other sites

The situation you've described, illuminating a back surface, isn't really defined. The purpose for defining a normal used in lighting calcs is to determine if the surface is illuminated at all - which it would not be - and, if so, then how it's illuminated. So...

 

 


Is the reflection vector i denoted "roughly" the angle of the reflection vector?

 

... if you want to define a "reflection" vector in that way, you can. If you want a "back" face to be illuminated as a reflective surface in a way you can consider to be "proper," then reverse the normal (i.e., multiply it by -1) and use the law of reflection.

Edited by Buckeye

Share this post


Link to post
Share on other sites

Thanks.

 

I realize the problem now, i just didn't know how the reflection actually works.

Share this post


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