Converts RGB color values to YUV color values.
XMVECTOR XMColorRGBToYUV(
XMVECTOR rgb
)
rgb
Type: XMVECTOR
Color value to convert. X element is Red, Y element is Green, Z element is Blue, and W element is Alpha. Each has a range of 0.0 to 1.0.
Type: XMVECTOR
Returns the converted color value in Luma-Chrominance (YUV) aka YCbCr. The X element contains Luma (Y, 0.0 to 1.0), the Y element contains Blue-difference chroma (-0.5 to 0.5), the Z element contains the Red-difference chroma (-0.5 to 0.5), and the W element contains the Alpha (a copy of rgb.w).
Converts using ITU-R BT.601/CCIR 601 W(r) = 0.299 W(b) = 0.114 U(max) = 0.436 V(max) = 0.615.
Note
XMColorRGBToYUVis new for DirectXMath and is not available for XNAMath 2.x.
Header: Declared in directxmath.h.