-
Notifications
You must be signed in to change notification settings - Fork 541
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
DrawCylinder Color.FromRGBA #2592
Comments
letts see internal code:
where rgb is 0x55FF0000u with is in bits (01010101111111110000000000000000)
mask the bit shift with 0xff
the 00000000000000000000000000000001 is just 1 so
output color
Conclusion funcions is brokendata masked out in the process So, Lets fix itAssuming the function is supposed to convert decode bytes inside the uint32 Inputrgba = 0x55FF0000u
version where top bits are R chanel
with results in following byte value output
version where buttom bits are R chanel
with results in following byte value output
|
Thanks for your suggestions and for spotting this issue. I refactored color processing with those bits, added proper info in doc comments to clarify which channel is used in the bottom bits, and added unit text to ensure this won't be broken again. |
Issue description:
Seems like bytes are in order of ARGB and not RGBA as function indicates.
Hence, Color.FromRGBA should be named Color.FromARGB. Or its just when drawing cylinder?
I dont know.
Steps to reproduce:
Flax version:
1.8.1
The text was updated successfully, but these errors were encountered: