Fix #128282: EEVEE: Unable to compile displacement

When using vertex displacement EEVEE didn't compile the generated
functions into the vertex shader. This could result in errors when
compiling materials.

**Notes**

- Should be back-ported to Blender 4.2

Pull Request: https://projects.blender.org/blender/blender/pulls/128525
This commit is contained in:
Jeroen Bakker
2024-10-10 12:16:28 +02:00
parent 7d5712be9b
commit 9bcba25bc2

View File

@@ -312,20 +312,10 @@ GlobalData g_data;
#ifndef GPU_FRAGMENT_SHADER
/* Stubs. */
vec3 dF_impl(vec3 v)
{
return vec3(0.0);
}
void dF_branch(float fn, out vec2 result)
{
result = vec2(0.0);
}
void dF_branch_incomplete(float fn, out vec2 result)
{
result = vec2(0.0);
}
# define dF_impl(a) (vec3(0.0))
# define dF_branch(a, b) (b = vec2(0.0))
# define dF_branch_incomplete(a, b) (b = vec2(0.0))
#elif defined(GPU_FAST_DERIVATIVE) /* TODO(@fclem): User Option? */
/* Fast derivatives */