abs
all
any
cos
ddx
ddy
dot
dst
exp
fma
lit
log
mad
max
min
mul
pow
rcp
sin
tan
Expand Minimize

D3DCOLORtoUBYTE4

Converts a floating-point, 4D vector set by a D3DCOLOR to a UBYTE4.

ret D3DCOLORtoUBYTE4(x)

 

This function swizzles and scales components of the x parameter. Use this function to compensate for the lack of UBYTE4 support in some hardware.

Parameters

ItemDescription

x

[in] The floating-point vector4 to convert.

 

Return Value

The UBYTE4 representation of the x parameter.

Type Description

Name Template Type Component Type Size
xvector float 4
retvector integer 4

 

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

 

See also

Intrinsic Functions (DirectX HLSL)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft