
To check if anisotropic filtering is available in the current physical device we will take a similar approach to when we checked if shader multisampling was available in an earlier article. A texture sampler defines whether anisotropic filtering should be applied to the texture as it is being rendered, so we need a way to find out if the feature is actually available at run time when constructing the sampler. When we author our texture class we will be creating a texture sampler - this is the mechanism through which our Vulkan shader will calculate what pixel from a texture bitmap to apply to a fragment during rendering. Update the Vulkan asset manager to create and cache Vulkan texture objects.Īnisotropic filtering is a device feature that we can enable if it is available which can help to dramatically improve the visual quality of textures that are rendered at an angle from the 3D camera - which in a 3D scene is pretty much always going to happen.Introduce a new Vulkan class that represents a texture object.Make a small tweak to our physical device and logical device to allow us to apply anisotropic filtering to our textures - this will noticeably improve the rendering quality.There is actually no such thing as a built in ‘texture’ object in Vulkan, rather the expectation is that the developer implement a data structure that has the characteristics of a ‘texture’ that Vulkan can read from during rendering.

Now that loading mesh data is out of the way we can implement the final asset type for our Vulkan application - textures.

A-simple-triangle / Part 27 - Vulkan load textures
