diff --git a/Single_Header/dn_single_header.cpp b/Single_Header/dn_single_header.cpp index 97fa2e3..b886c8b 100644 --- a/Single_Header/dn_single_header.cpp +++ b/Single_Header/dn_single_header.cpp @@ -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; } diff --git a/Single_Header/dn_single_header.h b/Single_Header/dn_single_header.h index 952dfeb..e36a12c 100644 --- a/Single_Header/dn_single_header.h +++ b/Single_Header/dn_single_header.h @@ -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 diff --git a/Source/Extra/dn_math.cpp b/Source/Extra/dn_math.cpp index caad8aa..3929065 100644 --- a/Source/Extra/dn_math.cpp +++ b/Source/Extra/dn_math.cpp @@ -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; }