diff options
author | Charlie Jolly <charlie> | 2021-03-23 12:21:56 +0300 |
---|---|---|
committer | Charlie Jolly <mistajolly@gmail.com> | 2021-03-23 12:59:20 +0300 |
commit | d3758892987d76749fdf1211ed27ff77f39b5b3b (patch) | |
tree | 0e0b6b2a614b9829255cae77fb75f93696e7df7b /source/blender/nodes/intern/math_functions.cc | |
parent | 4c19fcacc0b71271ca2fafc87ef5772a819e7075 (diff) |
Nodes: Add Refract and Faceforward functions to Vector Maths nodes
Cycles, Eevee, OSL, Geo, Attribute
Based on outdated refract patch D6619 by @cubic_sloth
`refract` and `faceforward` are standard functions in GLSL, OSL and Godot shader languages.
Adding these functions provides Blender shader artists access to these standard functions.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D10622
Diffstat (limited to 'source/blender/nodes/intern/math_functions.cc')
-rw-r--r-- | source/blender/nodes/intern/math_functions.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/math_functions.cc b/source/blender/nodes/intern/math_functions.cc index 14de2fce9b3..fb34144abf6 100644 --- a/source/blender/nodes/intern/math_functions.cc +++ b/source/blender/nodes/intern/math_functions.cc @@ -205,6 +205,10 @@ const FloatMathOperationInfo *get_float3_math_operation_info(const int operation RETURN_OPERATION_INFO("Cosine", "vector_math_cosine"); case NODE_VECTOR_MATH_TANGENT: RETURN_OPERATION_INFO("Tangent", "vector_math_tangent"); + case NODE_VECTOR_MATH_REFRACT: + RETURN_OPERATION_INFO("Refract", "vector_math_refract"); + case NODE_VECTOR_MATH_FACEFORWARD: + RETURN_OPERATION_INFO("Faceforward", "vector_math_faceforward"); } #undef RETURN_OPERATION_INFO |