-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
为什么转换代码是
inline static Vec4f vector_from_color(uint32_t rgba) { Vec4f out; out.r = ((rgba >> 16) & 0xff) / 255.0f; out.g = ((rgba >> 8) & 0xff) / 255.0f; out.b = ((rgba >> 0) & 0xff) / 255.0f; out.a = ((rgba >> 24) & 0xff) / 255.0f; return out; }
而不是
inline static Vec4f vector_from_color(uint32_t rgba) { Vec4f out; out.r = ((rgba >> 0) & 0xff) / 255.0f; out.g = ((rgba >> 8) & 0xff) / 255.0f; out.b = ((rgba >> 16) & 0xff) / 255.0f; out.a = ((rgba >> 24 & 0xff)) / 255.0f; return out; }
第一个字节不应该储存的是r吗,是我有哪部分知识遗漏了吗,望大佬赐教
Metadata
Metadata
Assignees
Labels
No labels