- Mar 25, 2022
- 1 min read
Today, to my Blinn-Phong shader, I added light attenuation for point lights and started implementing spotlights. I want the shader to deduce what type of light it is from the parameters, minimising the use of if-else statements as much as possible. So far it works well but needs fine-tuning.