pouët.net

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.
added on the 2008-11-30 22:58:55 by b0ib0t b0ib0t
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.
added on the 2008-11-30 23:21:09 by kusma kusma
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.
added on the 2008-11-30 23:51:54 by iq iq
It is not so hard: Blinn-Phong shading model
added on the 2008-12-01 02:38:59 by raer raer
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!
Quote:
float blinn = dot( (lightDir+viewVec)/(lightDir+viewVec), normalize(normal) ) ;

"|v|" is the length of a vector.
added on the 2008-12-01 08:25:41 by hfr hfr
aye,now it makes sense!

login