-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add more texture pixel format support such as 16-bit unsigned integer #7540
Comments
Is this proposal specifically for the Image class? Its a bit unclear where you are asking for the support to be implemented and what it will be used for |
Currently, the main way for Godot to use textures is through image classes, so adding them to image classes is the first step, followed by modifying the format check in different places . |
Yes, this proposal should be renamed and understood to be: Support all standard opengl integer and float formats in As a workaround, we can currently write integers into FORMAT_RF and read them in the shader as ints with this process:
What it is used for is integer data like bit fields. In Terrain3D, I am currently packing tons of information into 32 bits with the above workaround. |
Describe the project you are working on
A large terrain using heightmap.
Describe the problem or limitation you are having in your project
The height map used by the terrain is usually stored as a 16-bit unsigned int, but godot only supports R16_sfloat. If you want to not lose precision, you can only use R32_sfloat, which will double the size.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add uint support for all uncompressed formats, they can be sampled, just linear filtering is not supported. But I guess, people who use them should know this.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
can not
Is there a reason why this should be core and not an add-on in the asset library?
it's render core
The text was updated successfully, but these errors were encountered: