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:59:31 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-03 23:59:31 +0300
commit502c707e0e836b14516ceed54622adc3a605d31e (patch)
treec6b372b373ae48f5f2dc3521e30f6ef72cb279f4 /source/blender/gpu
parent1d668b6356327ba86d524d53bbf1360a5a0914d5 (diff)
parent281bcc1c1dd6b786bafa2712986885c44ed482a3 (diff)
Merge remote-tracking branch 'origin/blender-v3.2-release'
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.cc8
-rw-r--r--source/blender/gpu/intern/gpu_node_graph.c12
-rw-r--r--source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl4
3 files changed, 2 insertions, 22 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc
index 2e7c95974ab..b6b0825a993 100644
--- a/source/blender/gpu/intern/gpu_codegen.cc
+++ b/source/blender/gpu/intern/gpu_codegen.cc
@@ -326,14 +326,6 @@ void GPUCodegen::generate_attribs()
iface_type = input_type = GPU_VEC4;
load_ss << " = attr_load_tangent(" << attr_name << ");\n";
break;
- case CD_MTFACE:
- iface_type = input_type = GPU_VEC3;
- load_ss << " = attr_load_uv(" << attr_name << ");\n";
- break;
- case CD_MCOL:
- iface_type = input_type = GPU_VEC4;
- load_ss << " = attr_load_color(" << attr_name << ");\n";
- break;
default:
iface_type = input_type = GPU_VEC4;
load_ss << " = attr_load_" << input_type << "(" << attr_name << ");\n";
diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c
index 7f96a3b01c4..bc7ace792bb 100644
--- a/source/blender/gpu/intern/gpu_node_graph.c
+++ b/source/blender/gpu/intern/gpu_node_graph.c
@@ -331,15 +331,8 @@ void gpu_node_graph_finalize_uniform_attrs(GPUNodeGraph *graph)
static char attr_prefix_get(CustomDataType type)
{
switch (type) {
- case CD_MTFACE:
- return 'u';
case CD_TANGENT:
return 't';
- case CD_MCOL:
- case CD_PROP_BYTE_COLOR:
- return 'c';
- case CD_PROP_COLOR:
- return 'c';
case CD_AUTO_FROM_NAME:
return 'a';
case CD_HAIRLENGTH:
@@ -372,11 +365,6 @@ static GPUMaterialAttribute *gpu_node_graph_add_attribute(GPUNodeGraph *graph,
CustomDataType type,
const char *name)
{
- /* Fall back to the UV layer, which matches old behavior. */
- if (type == CD_AUTO_FROM_NAME && name[0] == '\0') {
- type = CD_MTFACE;
- }
-
/* Find existing attribute. */
int num_attributes = 0;
GPUMaterialAttribute *attr = graph->attributes.first;
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl
index d8fcbbfc361..87943cff18f 100644
--- a/source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl
+++ b/source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl
@@ -1,4 +1,4 @@
-void node_uvmap(vec3 attr_uv, out vec3 outvec)
+void node_uvmap(vec4 attr_uv, out vec3 outvec)
{
- outvec = attr_uv;
+ outvec = attr_uv.xyz;
}