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. Pull Request: https://projects.blender.org/blender/blender/pulls/147821
This commit is contained in:
committed by
Clément Foucault
parent
4f8e4044ae
commit
abc2cb24c9
@@ -28,4 +28,14 @@ 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. */
|
||||
# ifdef SHADOW_UPDATE_ATOMIC_RASTER
|
||||
shadow_iface.shadow_view_id = 0;
|
||||
# endif
|
||||
shadow_clip.position = float3(0);
|
||||
shadow_clip.vector = float3(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -29,4 +29,14 @@ 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. */
|
||||
# ifdef SHADOW_UPDATE_ATOMIC_RASTER
|
||||
shadow_iface.shadow_view_id = 0;
|
||||
# endif
|
||||
shadow_clip.position = float3(0);
|
||||
shadow_clip.vector = float3(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user