Blender Git Commit Log

Git Commits -> Revision 0406eb1

Revision 0406eb1 by Charlie Jolly (master)
December 7, 2019, 12:33 (GMT)
Maths Node: Additional functions

When creating shaders and using maths functions it is expected that Blender should match functions in other DCC applications, game engines and shading languages such as GLSL and OSL.

This patch adds missing functions to the Blender maths node.

Ideally, it would be nice to have these functions available to vectors too but that is not part of this patch.

This patch adds the following functions trunc, snap, wrap, compare, pingpong, sign, radians, degrees, cosh, sinh, tanh, exp, smoothmin and inversesqrt.

Sign function is based on GLSL and OSL functions and returns zero when x == 0.

Differential Revision: https://developer.blender.org/D5957

Commit Details:

Full Hash: 0406eb110332a863811d7fb6228f9a7ca514e022
Parent Commit: 6a78ace
Lines Changed: +1044, -37

17 Modified Paths:

/intern/cycles/kernel/shaders/node_math.osl (+62, -0) (Diff)
/intern/cycles/kernel/svm/svm_math.h (+4, -3) (Diff)
/intern/cycles/kernel/svm/svm_math_util.h (+33, -1) (Diff)
/intern/cycles/kernel/svm/svm_types.h (+16, -0) (Diff)
/intern/cycles/render/nodes.cpp (+25, -5) (Diff)
/intern/cycles/render/nodes.h (+1, -0) (Diff)
/intern/cycles/util/util_math.h (+39, -0) (Diff)
/source/blender/blenlib/intern/math_base_inline.c (+36, -0) (Diff)
/source/blender/compositor/nodes/COM_MathNode.cpp (+49, -0) (Diff)
/source/blender/compositor/operations/COM_MathBaseOperation.cpp (+271, -0) (Diff)
/source/blender/compositor/operations/COM_MathBaseOperation.h (+126, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_math.glsl (+114, -24) (Diff)
/source/blender/makesdna/DNA_node_types.h (+16, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+36, -3) (Diff)
/source/blender/nodes/composite/nodes/node_composite_math.c (+39, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_math.c (+36, -1) (Diff)
/source/blender/nodes/texture/nodes/node_texture_math.c (+141, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021