From 165073c36d1d0b8ee368bd40c9d4333886172dc0 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 16 Oct 2025 14:07:12 +0200 Subject: [PATCH] feat: initialize all vars in shaders --- src/shaders/pbr.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shaders/pbr.fs b/src/shaders/pbr.fs index 7182aee..4cad897 100644 --- a/src/shaders/pbr.fs +++ b/src/shaders/pbr.fs @@ -147,7 +147,7 @@ void main() for (int i = 0; i < lightsCount; i++) { // compute light vector L depending on type - vec3 L; + vec3 L = vec3(0); if (lights[i].type == 0) { // directional light: convention here is that lights[i].position stores the direction // *towards* the light (for example, for sun direction you may upload -sunDir).