Explorar el Código

Merge pull request #1621 from attilaz/getmips-fix

getMips cubemap fix
Бранимир Караџић hace 7 años
padre
commit
6e8113d60d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/renderer_mtl.mm

+ 1 - 1
src/renderer_mtl.mm

@@ -2878,7 +2878,7 @@ namespace bgfx { namespace mtl
 		{
 			if ( NULL == m_ptrMips[_mip] )
 			{
-				m_ptrMips[_mip] = m_ptr.newTextureViewWithPixelFormat(m_ptr.pixelFormat(), m_ptr.textureType(), NSMakeRange(_mip,1), NSMakeRange(0,m_ptr.arrayLength()));
+				m_ptrMips[_mip] = m_ptr.newTextureViewWithPixelFormat(m_ptr.pixelFormat(), m_ptr.textureType(), NSMakeRange(_mip,1), NSMakeRange(0,m_ptr.arrayLength() * (m_type == TextureCube ? 6 : 1)));
 			}
 
 			return m_ptrMips[_mip];