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
Blinn Phong Shading - EyeDir
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).
The Wikipedia page on the Blinn-Phong shading model explains this (although perhaps not very well).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement