Pārlūkot izejas kodu

More MRT changes for webgpu

Popov72 4 gadi atpakaļ
vecāks
revīzija
aa5eb8cada
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      src/Engines/webgpuEngine.ts

+ 3 - 2
src/Engines/webgpuEngine.ts

@@ -2958,7 +2958,7 @@ export class WebGPUEngine extends Engine {
      * Restores the WebGPU state to only draw on the main color attachment
      */
     public restoreSingleAttachment(): void {
-        this.bindAttachments([]);
+        // nothing to do, this is done automatically in the unBindFramebuffer function
     }
 
     /**
@@ -2985,7 +2985,7 @@ export class WebGPUEngine extends Engine {
      * @param attachments index of attachments
      */
     public bindAttachments(attachments: number[]): void {
-        this._mrtAttachments = attachments;
+        // nothing to do, this is done automatically in the _startRenderTargetRenderPass function
     }
 
     /**
@@ -3095,6 +3095,7 @@ export class WebGPUEngine extends Engine {
 
         this._currentRenderTarget = null;
 
+        this._mrtAttachments = [];
         this._currentRenderPass = this._mainRenderPassWrapper.renderPass;
         this._setDepthTextureFormat(this._mainRenderPassWrapper);
         this._setColorFormat(this._mainRenderPassWrapper);