Fix: EEVEE: Write to vertex shader outputs to avoid Intel linking errors

eevee_geom_world_vert.glsl and eevee_geom_volume_vert.glsl do not
support shadows, but the shader validation pipeline still compiles the
shadow variant of these shaders. This results in the fragment shader
reading from inputs that are not written to as vertex shader outputs.
On the Intel Windows OpenGL driver, this leads to a shader linking
failure. This PR avoids the issue by writing zeros to the interface
variables when MAT_SHADOW is defined.
This commit is contained in:
Christoph Neuhauser
2025-10-10 16:35:30 +02:00
parent 84fc90bb43
commit 16ad7524a7
2 changed files with 16 additions and 0 deletions

View File

@@ -28,4 +28,12 @@ void main()
interp.P = drw_point_object_to_world(lP);
gl_Position = reverse_z::transform(drw_point_world_to_homogenous(interp.P));
#ifdef MAT_SHADOW
/* Volumes currently do not support shadow. But the shader validation pipeline still compiles the
* shadow variant of this shader. Avoid linking error on Intel Windows drivers. */
shadow_iface.shadow_view_id = 0;
shadow_clip.position = float3(0);
shadow_clip.vector = float3(0);
#endif
}

View File

@@ -29,4 +29,12 @@ void main()
interp.N = float3(1);
gl_Position = reverse_z::transform(gl_Position);
#ifdef MAT_SHADOW
/* This shader currently does not support shadow. But the shader validation pipeline still
* compiles the shadow variant of this shader. Avoid linking error on Intel Windows drivers. */
shadow_iface.shadow_view_id = 0;
shadow_clip.position = float3(0);
shadow_clip.vector = float3(0);
#endif
}