-
Notifications
You must be signed in to change notification settings - Fork 921
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
Support normalized 16-bit texture formats #1934
Comments
I was looking into the details of this to see if I could implement it when I get some free time and noticed that the existing texture format features all have a Would you be open to adjusting the naming of the existing texture format features? It would be nice if they all followed the same pattern, such as Currently the compressed formats have features like I'm suggesting changing these to allow for other (non-compression formats) to all follow the same convention. e.g. // Enables ASTC family of compressed textures ...
TEXTURE_FORMAT_ETC2
// Enables ASTC family of compressed textures ...
TEXTURE_FORMAT_ASTC_LDR
// Enable additional 16-bit texture formats ...
TEXTURE_FORMAT_16BIT |
We should name the features the same way as WebGPU spec does it, unless there is a really strong reason to diverge. |
* Add feature gated 16-bit normalized texture support Fixes #1934 * Query format properties only once * Prevent supports_format from erroneously reporting false if the format wasn't queried * Assert that 16bit norm formats also support on vulkan * Add storage to TextureFormatInfo for 16-bit norm formats now that we check for support
@kvark Will this become a WebGPU feature any time soon ? |
I'm not participating in this standard body any more. |
Is your feature request related to a problem? Please describe.
It's often convenient to process the data in shaders as
u16
and store it this way. However, reading it in the shader is problematic: currently we have no 16-bit normalized formats, so it has to be bound as integer. But integer textures can't be sampled. So using them is highly restricted today without the normalization.Describe the solution you'd like
Exposed a set of 16-bit normalized formats gated by a feature.
Describe alternatives you've considered
Additional context
Requested on matrix.
The text was updated successfully, but these errors were encountered: