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
This commit is contained in:
Charlie Jolly
2021-03-23 09:21:56 +00:00
committed by Charlie Jolly
parent 4c19fcacc0
commit d375889298
17 changed files with 264 additions and 42 deletions

View File

@@ -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