Sampled images are used to read data from images (textures) inside shaders. Usually, they are used together with samplers. And to be able to use an image as a sampled image, it must be created with a VK_IMAGE_USAGE_SAMPLED_BIT usage.
Creating a sampled image
How to do it...
- Take the handle of a physical device stored in a variable of type VkPhysicalDevice named physical_device.
- Select a format that will be used for an image. Initialize a variable of type VkFormat named format with the selected image format.
- Create a variable of type VkFormatProperties named format_properties.
- Call vkGetPhysicalDeviceFormatProperties( physical_device, format, &format_properties ), for which to provide the physical_device variable, the format variable, and a pointer to the format_properties...