Diffuse and Specular
Added Diffuse and Specularity to the Raytracer - can't believe how simple those are to implement - the diffuse factor is the dot product of the lights normal with the surface normal (which is the same as the Cosine of the angle) and the specularity is the dot product of the reflection of the lightvector and the vector of the camera to the point raised to the power of the 'shininess' value used to describe the material.
When I first saw these values in studio max about 2004, they seemed so complex. Thats why raytracing is fun - it can start out very simply and gradually build up complexity.
Comments