I'm trying to implement a simple physically-accurate raytracer. I have it working in grayscale (so with light intensities) but I'm struggling with colors.
How do I calculate relation between colored (non-white) light and the surface. Say the light color is rgb(1.0,0.9,0.8) and the surface is rgb(0.8,0.9,1.0)?
In a very basic manner
Let's assume you've chosen the phong shading model or you've chosen not to do any specific shading.
Code: