Explorar o código

fix mipmap gen on last level

Nicolas Cannasse %!s(int64=4) %!d(string=hai) anos
pai
achega
0e829be1fc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      h3d/mat/Texture.hx

+ 1 - 1
h3d/mat/Texture.hx

@@ -301,7 +301,7 @@ class Texture {
 	}
 
 	function checkMipMapGen(mipLevel,layer) {
-		if( mipLevel == 0 && flags.has(MipMapped) && !flags.has(ManualMipMapGen) && (!flags.has(Cube) || layer == 5) )
+		if( mipLevel == 0 && flags.has(MipMapped) && !flags.has(ManualMipMapGen) && layer == layerCount - 1 )
 			mem.driver.generateMipMaps(this);
 	}