Skip to content
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

Texture Component Swizzling #1028

Closed
ghost opened this issue Nov 15, 2020 · 2 comments
Closed

Texture Component Swizzling #1028

ghost opened this issue Nov 15, 2020 · 2 comments
Labels
area: api Issues related to API surface help required We need community help to make this happen. type: enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Nov 15, 2020

Is there a way currently (or planned in the future) to perform texture component swizzling?

I'm referring to something like:
https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkComponentMapping.html

This will be useful for textures with only alpha channels (and similar use cases).
Seems like otherwise we have to use TextureFormat::R* variants and swizzle them to alpha channel in every shader, which does not seem ideal.

@kvark
Copy link
Member

kvark commented Nov 15, 2020

This isn't in WebGPU today because of earlier Metal versions. It's a good candidate for an optional feature.
See #754 for an example of how to roll such a feature out. A PR would be appreciated, and we are happy to mentor (ideally, via our "#wgpu:matrix.org" chat).

Edit: also added to https://github.com/gfx-rs/wgpu/wiki/Extensions

@kvark kvark transferred this issue from gfx-rs/wgpu-rs Nov 15, 2020
@kvark kvark changed the title [Question] Texture Component Swizzling Texture Component Swizzling Nov 15, 2020
@kvark kvark added area: api Issues related to API surface help required We need community help to make this happen. type: enhancement New feature or request labels Nov 15, 2020
@cwfitzgerald
Copy link
Member

We have no current plans to support this.

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants