|
|
@@ -111,10 +111,21 @@ class WebGPUUtils {
|
|
|
|
|
|
} else if ( texture.isDepthTexture && ! texture.renderTarget ) {
|
|
|
|
|
|
- const renderer = this.backend.renderer;
|
|
|
- const renderTarget = renderer.getRenderTarget();
|
|
|
+ const textureData = this.backend.get( texture );
|
|
|
|
|
|
- samples = renderTarget ? renderTarget.samples : renderer.currentSamples;
|
|
|
+ if ( textureData.texture !== undefined ) {
|
|
|
+
|
|
|
+ // use the effective sample count of the allocated texture
|
|
|
+
|
|
|
+ samples = textureData.texture.sampleCount;
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ // otherwise use the current samples of the renderer
|
|
|
+
|
|
|
+ samples = this.backend.renderer.currentSamples;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
} else if ( texture.renderTarget ) {
|
|
|
|