Skip to content

Latest commit

 

History

History
85 lines (42 loc) · 2.29 KB

dx-graphics-hlsl-d3dcolortoubyte4.md

File metadata and controls

85 lines (42 loc) · 2.29 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
D3DCOLORtoUBYTE4
Converts a floating-point, 4D vector set by a D3DCOLOR to a UBYTE4.
20a7be00-1e36-41c3-bc98-933b3faa8f35
D3DCOLORtoUBYTE4 HLSL
apiref
D3DCOLORtoUBYTE4
NA
reference
05/31/2018

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

Item Description
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
x vector float 4
ret vector integer 4

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
Shader Model 2 (DirectX HLSL) and higher shader models yes
Shader Model 1 (DirectX HLSL) vs_1_1

See also

Intrinsic Functions (DirectX HLSL)