What does VK_FILTER_CUBIC_IMG do?

Is this for cube maps or volume textures? What does it do? It looks like it originated from this extension, but that just says “adds cubic filtering”:
https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VK_EXT_filter_cubic.html

Is it describing this technique?
500px-Comparison_of_1D_and_2D_interpolation.svg

What would you use this for, height data? I already have tessellation code that does basically the same thing.

https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-texel-cubic-filtering

Tessellation tesselates, and filtering filters. They are completely different and orthogonal things. E.g. one could use both at the same time.

I don’t think bicubic is frequently used in realtime applications, and not sure how large is the support for the feature, much less its performance. Nevertheless it is there.

With tessellation, you have to curve surfaces (point-normal triangles). If you had a terrain heightmap and just read the texture displacement with a linear filter, the interpolated points would still form a jagged shape. I was thinking the bicubic filter might be to assist this kind of thing.

It is a generic algorithm. Can be used for anything. E.g. photo manipulation. You could vkCmdBlitImage with cubic, and bam you have resized image with cubic filter. It is often used when performance is not an issue when resizing images. When you watch video, chances are it is either spline or bicubic interpolation when scaled to the screen.

I actually think this will make an improvement on material blending for terrain.
Spbl4
Unfortunately, I am working on a GEForce 1660 right now which does not support this, so I am trying to implement it blindly. Should I be looking for the VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG flag in the VKFormatProperties::optimalTilingFeatures, linearTilingFeatures, or bufferFeatures member?

If the extension is supported (basically just on Imagination\Qualcomm), then it is supported for the formats as specified in the specification implicitly. Otherwise I assume you know what the difference is between optimal-tiling VkImage, linear-tiling VkImage, and a VkBuffer, which those props you mention relate to.

I’m guessing they are for optimal layout textures, linear layer textures, and textures that are rendered to?

If anyone is interested, this is a nice example of the technique in action:
https://github.com/KhronosGroup/glTF-Sample-Viewer/issues/409#issuecomment-1175581835

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