ssloy / tinyraytracer

A brief computer graphics / rendering course
https://github.com/ssloy/tinyraytracer/wiki
5k stars 333 forks source link

Colored Light Sources #27

Closed liestrela closed 2 years ago

liestrela commented 2 years ago

How can i add color to the light sources? How would I calculate the color reflected from a diffuse surface when the light source is not white? Also, does distance factor in differently in this case?