Sign in to follow this  
sjoerd222

Blinn Phong Shading - EyeDir

Recommended Posts

sjoerd222    138
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
alvaro    21247
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this