From 0064532c1e4952aec522736dfb64217b8cdd6d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Mon, 22 Jul 2024 18:16:55 +0200 Subject: [PATCH] Fix position from vertex shader partially uninitialized --- .../shaders/forward_clustered/scene_forward_clustered.glsl | 2 +- .../shaders/forward_mobile/scene_forward_mobile.glsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl index 20b080da4d8..4a630b0b0a0 100644 --- a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl @@ -352,7 +352,7 @@ void vertex_shader(vec3 vertex_input, } #ifdef OVERRIDE_POSITION - vec4 position; + vec4 position = vec4(1.0); #endif #ifdef USE_MULTIVIEW diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl index a64b2e10ea0..530a7a37db8 100644 --- a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl @@ -352,7 +352,7 @@ void main() { } #ifdef OVERRIDE_POSITION - vec4 position; + vec4 position = vec4(1.0); #endif #ifdef USE_MULTIVIEW