Ver Fonte

vulkan: don't try to enable anisotropic filtering if anisotropy is 1.

Sasha Szpakowski há 7 meses atrás
pai
commit
dd3ebae7a1
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/modules/graphics/vulkan/Graphics.cpp

+ 1 - 1
src/modules/graphics/vulkan/Graphics.cpp

@@ -2795,7 +2795,7 @@ VkSampler Graphics::createSampler(const SamplerState &samplerState)
 	samplerInfo.addressModeU = Vulkan::getWrapMode(samplerState.wrapU);
 	samplerInfo.addressModeV = Vulkan::getWrapMode(samplerState.wrapV);
 	samplerInfo.addressModeW = Vulkan::getWrapMode(samplerState.wrapW);
-	samplerInfo.anisotropyEnable = VK_TRUE;
+	samplerInfo.anisotropyEnable = samplerState.maxAnisotropy > 1 ? VK_TRUE : VK_FALSE;
 	samplerInfo.maxAnisotropy = static_cast<float>(samplerState.maxAnisotropy);
 
 	// TODO: This probably needs to branch on a pixel format to determine whether