Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_attribute.c
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | static int node_shader_gpu_attribute(GPUMaterial *mat, | ||||
| /* FIXME : if an attribute layer (like vertex color) has one of these names, | /* FIXME : if an attribute layer (like vertex color) has one of these names, | ||||
| * it will not work as expected. */ | * it will not work as expected. */ | ||||
| if (strcmp(attr->name, "density") == 0) { | if (strcmp(attr->name, "density") == 0) { | ||||
| return GPU_stack_link( | return GPU_stack_link( | ||||
| mat, node, "node_attribute_volume_density", in, out, GPU_builtin(GPU_VOLUME_DENSITY)); | mat, node, "node_attribute_volume_density", in, out, GPU_builtin(GPU_VOLUME_DENSITY)); | ||||
| } | } | ||||
| else if (strcmp(attr->name, "color") == 0) { | else if (strcmp(attr->name, "color") == 0) { | ||||
| return GPU_stack_link( | return GPU_stack_link( | ||||
| mat, node, "node_attribute_volume_color", in, out, GPU_builtin(GPU_VOLUME_DENSITY)); | mat, node, "node_attribute_volume_color", in, out, GPU_builtin(GPU_VOLUME_COLOR)); | ||||
| } | } | ||||
| else if (strcmp(attr->name, "flame") == 0) { | else if (strcmp(attr->name, "flame") == 0) { | ||||
| return GPU_stack_link( | return GPU_stack_link( | ||||
| mat, node, "node_attribute_volume_flame", in, out, GPU_builtin(GPU_VOLUME_FLAME)); | mat, node, "node_attribute_volume_flame", in, out, GPU_builtin(GPU_VOLUME_FLAME)); | ||||
| } | } | ||||
| else if (strcmp(attr->name, "temperature") == 0) { | else if (strcmp(attr->name, "temperature") == 0) { | ||||
| return GPU_stack_link(mat, | return GPU_stack_link(mat, | ||||
| node, | node, | ||||
| Show All 33 Lines | |||||