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

Binding specific mip-levels for images #1407

Open
MoritzBrueckner opened this issue Mar 19, 2022 · 1 comment
Open

Binding specific mip-levels for images #1407

MoritzBrueckner opened this issue Mar 19, 2022 · 1 comment

Comments

@MoritzBrueckner
Copy link
Contributor

MoritzBrueckner commented Mar 19, 2022

Is your feature request related to a problem? Please describe.
When using a readonly image2D uniform in a shader with imageStore(), there is currently no way of binding a specific mip-level to write to. It seems to be possible though with some graphics APIs and can be handy for a series of downsampling operations for example.

Describe the solution you'd like
A setTexture() function with a parameter to specify the mip level.

Describe alternatives you've considered
Using individual textures for each mip level, as for my concrete use case (downsampling an image) mip levels are not required and I only need one level per shader dispatch because each operation requires the result of the previous iteration.

@MoritzBrueckner MoritzBrueckner changed the title Separately binding mip-levels for images in compute API Binding specific mip-levels for images in compute API Mar 19, 2022
@MoritzBrueckner MoritzBrueckner changed the title Binding specific mip-levels for images in compute API Allow to write custom data to specific mip levels in g4 and compute API Sep 30, 2022
@MoritzBrueckner MoritzBrueckner changed the title Allow to write custom data to specific mip levels in g4 and compute API Binding specific mip-levels for images Sep 30, 2022
@MoritzBrueckner
Copy link
Contributor Author

Looks like I can achieve my concrete use case also with Image.setMipmaps(), whose existence I didn't know about until a few minutes ago. Before that I changed the issue description above, but now that I realized that the feature I described is already available, I reverted it back to the original issue that is still not implemented in Kha as far as I know. However, my issue is resolved, and if you think that Kha doesn't need this specific feature (which still would be nice to have though), feel free to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant