Parcourir la source

DX11: Fixed an issue where mip-maps were disabled during rendering

BearishSun il y a 9 ans
Parent
commit
0411c07e17
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      Source/BansheeD3D11RenderAPI/Source/BsD3D11RenderAPI.cpp

+ 2 - 1
Source/BansheeD3D11RenderAPI/Source/BsD3D11RenderAPI.cpp

@@ -393,7 +393,8 @@ namespace bs { namespace ct
 
 						if (texture != nullptr)
 						{
-							SPtr<TextureView> texView = texture->requestView(surface.mipLevel, 1, surface.arraySlice, surface.numArraySlices, GVU_DEFAULT);
+							SPtr<TextureView> texView = texture->requestView(surface.mipLevel, surface.numMipLevels, 
+															surface.arraySlice, surface.numArraySlices, GVU_DEFAULT);
 
 							D3D11TextureView* d3d11texView = static_cast<D3D11TextureView*>(texView.get());
 							srvs[slot] = d3d11texView->getSRV();