generated from nathanfranke/gdextension
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Convert control map from 8/8/8 to 5/5/3/1 #115
Comments
Closed
Out of curiosity , wouldn't this give a performance improvement by pushing more the 32 texture limit? |
We already hard limit the texture count to 32. The new control map format keeps that limit. All it does is compress 32 texture index stored in 8 bits to 5 bits. No performance difference. |
This was referenced Oct 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See discussion here: #64
Currently control paints and reads RGB8 in 8/8/8 bit floats as base/overlay/blend.
New format is 32-bit unsigned integer (stored as RF since Godot doesn't support int formats in all cases). Here is the definition starting with the left most bits.
(x & 0x1F) <<27
x >>27u & 0x1Fu
(x & 0x1F) <<22
x >>22u & 0x1Fu
(x & 0xFF) <<14
x >>14u & 0xFFu
(x & 0x1) <<2
x >>2u & 0x1u
(x & 0x1) <<1
x >>1u & 0x1u
x & 0x1
x & 0x1u
Possible future plans for reserved bits:
(x & 0x7) <<19
|x >>19u & 0x7u
Array for all + marked 3-bit indices above:
{ 0.0f, .125f, .25f, .334f, .5f, .667f, .8f, 1.0f }
;Also see #64, #4, #60
The text was updated successfully, but these errors were encountered: