Browse Source

vulkan: fix mip maps

niki 3 years ago
parent
commit
748f2676d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/vulkan/Texture.cpp

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

@@ -144,7 +144,7 @@ void Texture::createTextureImageView() {
 	viewInfo.format = vulkanFormat.internalFormat;
 	viewInfo.format = vulkanFormat.internalFormat;
 	viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
 	viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
 	viewInfo.subresourceRange.baseMipLevel = 0;
 	viewInfo.subresourceRange.baseMipLevel = 0;
-	viewInfo.subresourceRange.levelCount = 1;
+	viewInfo.subresourceRange.levelCount = getMipmapCount();
 	viewInfo.subresourceRange.baseArrayLayer = 0;
 	viewInfo.subresourceRange.baseArrayLayer = 0;
 	viewInfo.subresourceRange.layerCount = layerCount;
 	viewInfo.subresourceRange.layerCount = layerCount;
 	viewInfo.components.r = vulkanFormat.swizzleR;
 	viewInfo.components.r = vulkanFormat.swizzleR;