Can I perform a blit that performs a minimum or maximum texture lookup?

I want to downsample an image and find the highest value for each group of four pixels, and write that to the half-resolution texture, instead of averaging the four pixels. Does vkCmdBlitImage work together with the min-max texture sample feature?:

Blitting is just a copy, with an optional filter. It doesn’t sample textures; it just copies images.

If you want to use sampler functionality, you have to fetch from a texture. You could use a compute shader if you don’t want to do rendering.

I don’t recommend a compute shader for real-time image manipulation. It’s significantly slower, and scatter-write doesn’t work in practice unless each invocation writes to pixels that no other invocation writes to.

Well… yes, each invocation would write to pixels other invocations don’t. You implement a blit by having one invocation for each pixel in the destination image.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.