Jump to content
  • Advertisement
Sign in to follow this  
sjoerd222

Blinn Phong Shading - EyeDir

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

Hello

I have a problem understanding the implementation of a blinn phong shader. This approach uses the halfvector := normalize(EyeDir+LightDir). So I read you do not have to recalculate the reflection vector all the time.
But I do not see why this is the case. As the EyeDir-vector(=ModelViewProjectionMatrix*position) varies for every point in the 3D space and the lightdir remains the same (Directional light in this case) the halfvector varies for every point. So I have to calculate the halfvector for every point??? Please tell me what I missed.

kind regards

sjoerd222

Share this post


Link to post
Share on other sites
Advertisement
I think what they mean is that if you are rendering an object that is far from the observer and from the light source (it's contained in a narrow cone from both), you can treat the observer and the light source as being at infinity and H as constant for all the points in the object. Of course this won't work for the whole scene.

The Wikipedia page on the Blinn-Phong shading model explains this (although perhaps not very well).

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!