Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_codegen.cc
| Show First 20 Lines • Show All 320 Lines • ▼ Show 20 Lines | switch (attr->type) { | ||||
| case CD_HAIRLENGTH: | case CD_HAIRLENGTH: | ||||
| iface_type = input_type = GPU_FLOAT; | iface_type = input_type = GPU_FLOAT; | ||||
| load_ss << " = attr_load_" << input_type << "(" << attr_name << ");\n"; | load_ss << " = attr_load_" << input_type << "(" << attr_name << ");\n"; | ||||
| break; | break; | ||||
| case CD_TANGENT: | case CD_TANGENT: | ||||
| iface_type = input_type = GPU_VEC4; | iface_type = input_type = GPU_VEC4; | ||||
| load_ss << " = attr_load_tangent(" << attr_name << ");\n"; | load_ss << " = attr_load_tangent(" << attr_name << ");\n"; | ||||
| break; | 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: | default: | ||||
| iface_type = input_type = GPU_VEC4; | iface_type = input_type = GPU_VEC4; | ||||
| load_ss << " = attr_load_" << input_type << "(" << attr_name << ");\n"; | load_ss << " = attr_load_" << input_type << "(" << attr_name << ");\n"; | ||||
| break; | break; | ||||
| } | } | ||||
| info.vertex_in(slot--, to_type(input_type), attr_name); | info.vertex_in(slot--, to_type(input_type), attr_name); | ||||
| iface.smooth(to_type(iface_type), var_name); | iface.smooth(to_type(iface_type), var_name); | ||||
| ▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines | |||||