feat: initialize all vars in shaders

This commit is contained in:
2025-10-16 14:07:12 +02:00
parent 87168d42c3
commit 165073c36d

View File

@ -147,7 +147,7 @@ void main()
for (int i = 0; i < lightsCount; i++) for (int i = 0; i < lightsCount; i++)
{ {
// compute light vector L depending on type // compute light vector L depending on type
vec3 L; vec3 L = vec3(0);
if (lights[i].type == 0) { if (lights[i].type == 0) {
// directional light: convention here is that lights[i].position stores the direction // directional light: convention here is that lights[i].position stores the direction
// *towards* the light (for example, for sun direction you may upload -sunDir). // *towards* the light (for example, for sun direction you may upload -sunDir).