NAME
cross - returns the cross product of two three-component vectors
SYNOPSIS
float3 cross(float3 a, float3 b); half3 cross(half3 a, half3 b); fixed3 cross(fixed3 a, fixed3 b);PARAMETERS
- a
Three-component vector.
- b
Three-component vector.
DESCRIPTION
Returns the cross product of three-component vectors a and b. The result is a three-component vector.
REFERENCE IMPLEMENTATION
cross for float3 vectors could be implemented this way:
float3 cross(float3 a, float3 b) { return a.yzx * b.zxy - a.zxy * b.yzx; }PROFILE SUPPORT
cross is supported in all profiles.
Support in the fp20 is limited.
SEE ALSO