Skip to content

Commit

Permalink
WebGPURenderer: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Sep 5, 2020
1 parent 2876fcc commit d82f89e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/jsm/renderers/webgpu/WebGPURenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ class WebGPURenderer {
const colorAttachment = this._renderPassDescriptor.colorAttachments[ 0 ];
const depthStencilAttachment = this._renderPassDescriptor.depthStencilAttachment;

if ( this._renderTarget !== null ) {
const renderTarget = this._renderTarget;

const renderTargetProperties = this._properties.get( this._renderTarget );
if ( renderTarget !== null ) {

const renderTargetProperties = this._properties.get( renderTarget );

colorAttachment.attachment = renderTargetProperties.colorTextureGPU.createView();
depthStencilAttachment.attachment = renderTargetProperties.depthTextureGPU.createView();
Expand Down

0 comments on commit d82f89e

Please sign in to comment.