Fix #103903: Bump Node performance regression
Avoid computing the non-derivative height twice. The height is now computed as part of the main function, while the height at x and y offsets are still computed on a separate function. The differentials are now computed directly at node_bump. Co-authored-by: Miguel Pozo <pragma37@gmail.com> Pull Request #104595
This commit is contained in:
@@ -647,21 +647,6 @@ char *GPU_material_split_sub_function(GPUMaterial *material,
|
||||
SNPRINTF(func_link->name, "ntree_fn%d", material->generated_function_len++);
|
||||
BLI_addtail(&material->graph.material_functions, func_link);
|
||||
|
||||
/* Set value to break the link with the main graph. */
|
||||
switch (return_type) {
|
||||
case GPU_FLOAT:
|
||||
GPU_link(material, "set_value_one", link);
|
||||
break;
|
||||
case GPU_VEC3:
|
||||
GPU_link(material, "set_rgb_one", link);
|
||||
break;
|
||||
case GPU_VEC4:
|
||||
GPU_link(material, "set_rgba_one", link);
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
return func_link->name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user