light intensity eq for shading
This is the information i have for computing light intensi开发者_C百科ty (color) phong shading:
Have a directional light coming from [1,1,1] eye coordinates.
I have normal for each vertex of the object which is nx, ny, nz not in eye coordinates. I have [0.1,0.1,0.2] as color for ambient and diffuse. I have [0.8,0.8,0.8] as color for specular.How do i implement the light intensity (color) using this information alone without using open gl (assignment sake).
There's a good description of Phong Shading here: http://en.wikipedia.org/wiki/Phong_shading
精彩评论