mul
abs
all
any
cos
ddx
ddy
dot
dst
exp
fma
lit
log
mad
max
min
mul
pow
rcp
sin
tan
TOC
Collapse the table of content
Expand the table of content

mul

Multiplies x and y using matrix math. The inner dimension x-columns and y-rows must be equal.

ret mul(x, y)

 

Parameters

ItemDescription

x

[in] The x input value. If x is a vector, it treated as a row vector.

y

[in] The y input value. If y is a vector, it treated as a column vector.

 

Return Value

The result of x times y. The result has the dimension x-rows x y-columns.

Type Description

There are 9 overloaded versions of this function; the overloaded versions handle the different cases for the types and sizes of the input arguments.

VersionNamePurpose Template Type Component Type Size
1
xinscalarfloat, int1
yinscalarsame as input x1
retoutscalarsame as input x1
2
xinscalarfloat, int1
yinvectorfloat, intany
retoutvectorfloat, intsame dimension(s) as input y
3
xinscalarfloat, int1
yinmatrixfloat, intany
retoutmatrixsame as input ysame dimension(s) as input y
4
xinvectorfloat, intany
yinscalarfloat, int1
retoutvectorfloat, intsame dimension(s) as input x
5
xinvectorfloat, intany
yinvectorfloat, intsame dimension(s) as input x
retoutscalarfloat, int1
6
xinvectorfloat, intany
yinmatrixfloat, introws = same dimension(s) as input x, columns = any
retoutvectorfloat, intsame dimension(s) as input y columns
7
xinmatrixfloat, intany
yinscalarfloat, int1
retoutmatrixfloat, intsame dimension(s) as input x
8
xinmatrixfloat, intany
yinvectorfloat, intnumber of columns in input x
retoutvectorfloat, intnumber of rows in input x
9
xinmatrixfloat, intany
yinmatrixfloat, introws = number of columns in input x
retoutmatrixfloat, introws = number of rows in input x, columns = number of columns in input y

 

Minimum Shader Model

This function is supported in the following shader models.

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

 

See also

Intrinsic Functions (DirectX HLSL)

 

 

Show:
© 2016 Microsoft