blob: f1747c3095ad2d0e21e9c072d670840c6faffec8 [file] [log] [blame]
// Copyright (c) 2016-2020 Imagination Technologies Limited
//
// SPDX-License-Identifier: CC-BY-4.0
include::{generated}/meta/{refprefix}VK_IMG_filter_cubic.txt[]
=== Other Extension Metadata
*Last Modified Date*::
2016-02-23
*Contributors*::
- Tobias Hector, Imagination Technologies
=== Description
`VK_IMG_filter_cubic` adds an additional, high quality cubic filtering mode
to Vulkan, using a Catmull-Rom bicubic filter.
Performing this kind of filtering can be done in a shader by using 16
samples and a number of instructions, but this can be inefficient.
The cubic filter mode exposes an optimized high quality texture sampling
using fixed texture sampling functionality.
include::{generated}/interfaces/VK_IMG_filter_cubic.txt[]
=== Example
Creating a sampler with the new filter for both magnification and
minification
[source,c++]
----------------------------------------
VkSamplerCreateInfo createInfo =
{
VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO // sType
// Other members set to application-desired values
};
createInfo.magFilter = VK_FILTER_CUBIC_IMG;
createInfo.minFilter = VK_FILTER_CUBIC_IMG;
VkSampler sampler;
VkResult result = vkCreateSampler(
device,
&createInfo,
&sampler);
----------------------------------------
=== Version History
* Revision 1, 2016-02-23 (Tobias Hector)
- Initial version