diff --git a/base/VulkanTextOverlay.hpp b/base/VulkanTextOverlay.hpp index 7ed6ae96..3c749818 100644 --- a/base/VulkanTextOverlay.hpp +++ b/base/VulkanTextOverlay.hpp @@ -312,6 +312,7 @@ public: samplerInfo.minLod = 0.0f; samplerInfo.maxLod = 1.0f; samplerInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; + samplerInfo.maxAnisotropy = 1.0f; VK_CHECK_RESULT(vkCreateSampler(vulkanDevice->logicalDevice, &samplerInfo, nullptr, &sampler)); // Descriptor diff --git a/base/VulkanTexture.hpp b/base/VulkanTexture.hpp index 0c9a2e1e..129fedd8 100644 --- a/base/VulkanTexture.hpp +++ b/base/VulkanTexture.hpp @@ -523,6 +523,7 @@ namespace vks samplerCreateInfo.compareOp = VK_COMPARE_OP_NEVER; samplerCreateInfo.minLod = 0.0f; samplerCreateInfo.maxLod = 0.0f; + samplerCreateInfo.maxAnisotropy = 1.0f; VK_CHECK_RESULT(vkCreateSampler(device->logicalDevice, &samplerCreateInfo, nullptr, &sampler)); // Create image view diff --git a/shadowmapping/shadowmapping.cpp b/shadowmapping/shadowmapping.cpp index 567a1d54..a680015b 100644 --- a/shadowmapping/shadowmapping.cpp +++ b/shadowmapping/shadowmapping.cpp @@ -295,7 +295,7 @@ public: sampler.addressModeV = sampler.addressModeU; sampler.addressModeW = sampler.addressModeU; sampler.mipLodBias = 0.0f; - sampler.maxAnisotropy = 0; + sampler.maxAnisotropy = 1.0f; sampler.minLod = 0.0f; sampler.maxLod = 1.0f; sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE; diff --git a/ssao/ssao.cpp b/ssao/ssao.cpp index 7a9d5706..76bd5836 100644 --- a/ssao/ssao.cpp +++ b/ssao/ssao.cpp @@ -217,15 +217,6 @@ public: textures.ssaoNoise.destroy(); } - virtual void getEnabledFeatures() - { - // Enable anisotropic filtering if supported - if (deviceFeatures.samplerAnisotropy) { - enabledFeatures.samplerAnisotropy = VK_TRUE; - }; - } - - // Create a frame buffer attachment void createAttachment( VkFormat format, @@ -529,7 +520,7 @@ public: sampler.addressModeV = sampler.addressModeU; sampler.addressModeW = sampler.addressModeU; sampler.mipLodBias = 0.0f; - sampler.maxAnisotropy = 0; + sampler.maxAnisotropy = 1.0f; sampler.minLod = 0.0f; sampler.maxLod = 1.0f; sampler.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE;