Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_math.c
| Show First 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | case NODE_MATH_SQRT: | ||||
| break; | break; | ||||
| default: | default: | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| if (node->custom2 & SHD_MATH_CLAMP) { | if (node->custom2 & SHD_MATH_CLAMP) { | ||||
| float min[3] = {0.0f, 0.0f, 0.0f}; | float min[3] = {0.0f, 0.0f, 0.0f}; | ||||
| float max[3] = {1.0f, 1.0f, 1.0f}; | float max[3] = {1.0f, 1.0f, 1.0f}; | ||||
| GPU_link(mat, "clamp_val", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link); | GPU_link(mat, "clamp_value", out[0].link, GPU_constant(min), GPU_constant(max), &out[0].link); | ||||
| } | } | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| void register_node_type_sh_math(void) | void register_node_type_sh_math(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| Show All 10 Lines | |||||