Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_uvmap.cc
| Show All 38 Lines | |||||
| static int node_shader_gpu_uvmap(GPUMaterial *mat, | static int node_shader_gpu_uvmap(GPUMaterial *mat, | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| GPUNodeStack *in, | GPUNodeStack *in, | ||||
| GPUNodeStack *out) | GPUNodeStack *out) | ||||
| { | { | ||||
| NodeShaderUVMap *attr = static_cast<NodeShaderUVMap *>(node->storage); | NodeShaderUVMap *attr = static_cast<NodeShaderUVMap *>(node->storage); | ||||
| GPUNodeLink *mtface = GPU_attribute(mat, CD_MTFACE, attr->uv_map); | |||||
| /* NOTE: using CD_AUTO_FROM_NAME instead of CD_MTFACE as geometry nodes may overwrite data which | |||||
| * will also change the CustomDataType. This will also make EEVEE and Cycles consistent. See | |||||
| * T93179. */ | |||||
| GPUNodeLink *mtface = GPU_attribute(mat, CD_AUTO_FROM_NAME, attr->uv_map); | |||||
| GPU_stack_link(mat, node, "node_uvmap", in, out, mtface); | GPU_stack_link(mat, node, "node_uvmap", in, out, mtface); | ||||
| node_shader_gpu_bump_tex_coord(mat, node, &out[0].link); | node_shader_gpu_bump_tex_coord(mat, node, &out[0].link); | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| Show All 20 Lines | |||||