Fix V4 from RGBU32

This commit is contained in:
doylet 2025-09-12 22:05:47 +10:00
parent ae5ef22f6f
commit 8642af0b05
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
// Generated by the DN single header generator 2025-09-12 22:02:31
// Generated by the DN single header generator 2025-09-12 22:05:30
#define DN_BASE_INC_CPP
@ -12748,9 +12748,9 @@ DN_API DN_V3F32 DN_V3_Normalise(DN_V3F32 a)
DN_API DN_V4F32 DN_V4F32_FromRGBU32(DN_U32 u32)
{
DN_U8 r = (DN_U8)(((u32 << 8) & DN_V4_R_MASK_U32) >> 24);
DN_U8 g = (DN_U8)(((u32 << 8) & DN_V4_G_MASK_U32) >> 16);
DN_U8 b = (DN_U8)(((u32 << 8) & DN_V4_B_MASK_U32) >> 8);
DN_U8 r = (DN_U8)((u32 & DN_V4_R_MASK_U32) >> 24);
DN_U8 g = (DN_U8)((u32 & DN_V4_G_MASK_U32) >> 16);
DN_U8 b = (DN_U8)((u32 & DN_V4_B_MASK_U32) >> 8);
DN_V4F32 result = DN_V4F32_FromRGBU8(r, g, b);
return result;
}

View File

@ -1,4 +1,4 @@
// Generated by the DN single header generator 2025-09-12 22:02:31
// Generated by the DN single header generator 2025-09-12 22:05:29
#if !defined(DN_BASE_INC_H)
#define DN_BASE_INC_H

View File

@ -832,9 +832,9 @@ DN_API DN_V3F32 DN_V3_Normalise(DN_V3F32 a)
DN_API DN_V4F32 DN_V4F32_FromRGBU32(DN_U32 u32)
{
DN_U8 r = (DN_U8)(((u32 << 8) & DN_V4_R_MASK_U32) >> 24);
DN_U8 g = (DN_U8)(((u32 << 8) & DN_V4_G_MASK_U32) >> 16);
DN_U8 b = (DN_U8)(((u32 << 8) & DN_V4_B_MASK_U32) >> 8);
DN_U8 r = (DN_U8)((u32 & DN_V4_R_MASK_U32) >> 24);
DN_U8 g = (DN_U8)((u32 & DN_V4_G_MASK_U32) >> 16);
DN_U8 b = (DN_U8)((u32 & DN_V4_B_MASK_U32) >> 8);
DN_V4F32 result = DN_V4F32_FromRGBU8(r, g, b);
return result;
}