cross

Returns the cross product of two floating-point, 3D vectors.

ret cross(x, y)

 

Parameters

ItemDescription

x

[in] The first floating-point, 3D vector.

y

[in] The second floating-point, 3D vector.

 

Return Value

The cross product of the x parameter and the y parameter.

Type Description

Name Template Type Component Type Size
xvector float 3
yvector float 3
retvector float 3

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 2 (DirectX HLSL) and higher shader modelsyes
Shader Model 1 (DirectX HLSL) vs_1_1 and ps_1_4

 

See also

Intrinsic Functions (DirectX HLSL)

 

 

Show: