Преглед изворни кода

WebGPUBackend: `generateMipmaps` in layers (#29151)

sunag пре 1 година
родитељ
комит
4046207972
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      src/renderers/webgpu/utils/WebGPUTextureUtils.js

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

@@ -237,7 +237,13 @@ class WebGPUTextureUtils {
 
 		} 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号