Przeglądaj źródła

WebGPUBackend: `generateMipmaps` in layers (#29151)

sunag 1 rok temu
rodzic
commit
4046207972

+ 7 - 1
src/renderers/webgpu/utils/WebGPUTextureUtils.js

@@ -237,7 +237,13 @@ class WebGPUTextureUtils {
 
 
 		} else {
 		} else {
 
 
-			this._generateMipmaps( textureData.texture, textureData.textureDescriptorGPU );
+			const depth = texture.image.depth || 1;
+
+			for ( let i = 0; i < depth; i ++ ) {
+
+				this._generateMipmaps( textureData.texture, textureData.textureDescriptorGPU, i );
+
+			}
 
 
 		}
 		}
 
 

粤ICP备19079148号