From the application (API) perspective, samplers and sampled images are always separate objects. But inside shaders, they can be combined into one object. On some platforms, sampling from combined image samplers inside shaders may be more optimal than using separate samplers and sampled images.
Creating a combined image sampler
How to do it...
- Create a sampler object and store its handle in a variable of type VkSampler named sampler (refer to the Creating a sampler recipe).
- Create a sampled image. Store the handle of the created image in a variable of type VkImage named sampled_image. Create an appropriate view for the sampled image and store its handle in a variable of type VkImageView named sampled_image_view (refer to the Creating a sampled image recipe).