Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-03 23:45:27 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-03 23:50:04 +0300
commit281bcc1c1dd6b786bafa2712986885c44ed482a3 (patch)
treeaf2ec45d2d67fce7ee94086074c05d806722fc48 /source/blender/draw/intern/shaders
parent94205e1d029511b2ab714a53d84de8c50a70fb39 (diff)
Fix T93179: geonodes UVs and Vertex colors do not work in EEVEE
Overwriting UV map or vertex color data in Geometry nodes will move the layers to another CustomData channel, and as such, will make attribute lookup fail from the UVMap and Vertex Color nodes in EEVEE as the CustomDataType will also be modified (i.e. no longer `CD_MTFACE` or `CD_MCOL`). As discussed in T93179, the solution is to use `CD_PROP_AUTO_FROM_NAME` so that the render engine is able to find the attributes. This also makes EEVEE emulate Cycles behaviour in this regard. `attr_load_uv` and `attr_load_color` are also removed in favor of the generic attribute API in the various GLSL shaders. Although `CD_PROP_AUTO_FROM_NAME` is now used even for UV maps, the active UV map is still used in case the attribute name is empty, to preserve the old behavior. Differential Revision: https://developer.blender.org/D13730
Diffstat (limited to 'source/blender/draw/intern/shaders')
-rw-r--r--source/blender/draw/intern/shaders/common_attribute_lib.glsl6
1 files changed, 0 insertions, 6 deletions
diff --git a/source/blender/draw/intern/shaders/common_attribute_lib.glsl b/source/blender/draw/intern/shaders/common_attribute_lib.glsl
index 30239a84c0c..ce5e49c7f63 100644
--- a/source/blender/draw/intern/shaders/common_attribute_lib.glsl
+++ b/source/blender/draw/intern/shaders/common_attribute_lib.glsl
@@ -4,8 +4,6 @@
vec3 attr_load_orco(vec4 orco);
vec4 attr_load_tangent(vec4 tangent);
-vec3 attr_load_uv(vec3 uv);
-vec4 attr_load_color(vec4 color);
vec4 attr_load_vec4(vec4 attr);
vec3 attr_load_vec3(vec3 attr);
vec2 attr_load_vec2(vec2 attr);
@@ -13,8 +11,6 @@ float attr_load_float(float attr);
vec3 attr_load_orco(samplerBuffer orco);
vec4 attr_load_tangent(samplerBuffer tangent);
-vec3 attr_load_uv(samplerBuffer uv);
-vec4 attr_load_color(samplerBuffer color);
vec4 attr_load_vec4(samplerBuffer attr);
vec3 attr_load_vec3(samplerBuffer attr);
vec2 attr_load_vec2(samplerBuffer attr);
@@ -22,8 +18,6 @@ float attr_load_float(samplerBuffer attr);
vec3 attr_load_orco(sampler3D orco);
vec4 attr_load_tangent(sampler3D tangent);
-vec3 attr_load_uv(sampler3D attr);
-vec4 attr_load_color(sampler3D tex);
vec4 attr_load_vec4(sampler3D tex);
vec3 attr_load_vec3(sampler3D tex);
vec2 attr_load_vec2(sampler3D tex);