Browse Source

fix mipmap gen on last level

Nicolas Cannasse 4 years ago
parent
commit
0e829be1fc
1 changed files with 1 additions and 1 deletions
  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);
 	}