blinn shading
category: general [glöplog]
Wow, I've been reading Freax, and just learned of Blinn shading. I've never heard of this before!!! From what I read its like a cross between Phong, and Gouraud. Are there any examples/demos of this? SW rendered ones, open source ones preferably. If not anything will do.
By "Blinn shading", do you mean Blinn-Phong shading (Wikipedia redirects "Blinn shading" to "Blinn-Phong shading model")? If so, it's not a mixture between Phong and Gouraud at all - it's an improvement over regular Phong.
yep, and it's what OpenGL's fixed function pipeline uses for the specular component of the lighting (not Phong), and what most people are using when writing their own shaders.
It is not so hard: Blinn-Phong shading model
ok,you say it isn´t hard...i tried to to it following the wiki-entrys formula:
float blinn = dot( (lightDir+viewVec)/(lightDir+viewVec), normalize(normal) ) ;
but my light is coming from the right upper side this way,no matter where i move it!
so what am i doing wrong here? not that i would need it (as its the ffp-default anyway) ,but i thought "ok,do it fast,its easy" and now it doesn´t work! leaves me kinda baffled right now!
float blinn = dot( (lightDir+viewVec)/(lightDir+viewVec), normalize(normal) ) ;
but my light is coming from the right upper side this way,no matter where i move it!
so what am i doing wrong here? not that i would need it (as its the ffp-default anyway) ,but i thought "ok,do it fast,its easy" and now it doesn´t work! leaves me kinda baffled right now!
Quote:
float blinn = dot( (lightDir+viewVec)/(lightDir+viewVec), normalize(normal) ) ;
"|v|" is the length of a vector.
aye,now it makes sense!