-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
u32 pixel color vs f32 #199
Comments
See also #98. The #[repr(C)]
#[align(4)]
struct Color {
reserved: u8,
red: u8,
green: u8,
blue: u8,
} So it doesn't actually have anything to do with the |
I thought it would be better to be able to have a vec4 of f32 buffer instead of having to convert vec4 f32 color to u32 at each pixel. |
Most windowing systems use 8-bit per channel color when doing software rendering, which is why this crate exposes that. It would be a significant performance hit to use anything else. |
Hello,
Why softbuffer provides u32 for the pixel color ?
Wouldn't it be better to provide f32 color to be aligned to gpu ?
Thank you in advance for your answers.
The text was updated successfully, but these errors were encountered: