Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 |