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 8, 2020
1 parent ee3fe43 commit 00cabc4
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions examples/jsm/renderers/webgpu/WebGPURenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ class WebGPURenderer {

// ensure some parameters

this.parameters.antialias = this.parameters.antialias === true;
this.parameters.antialias = ( this.parameters.antialias === true );

if ( this.parameters.antialias ) {
if ( this.parameters.antialias === true ) {

this.parameters.sampleCount = this.parameters.sampleCount || 4;

Expand Down Expand Up @@ -129,13 +129,6 @@ class WebGPURenderer {

// @TODO: Support RenderTarget with antialiasing.

if ( this.parameters.antialias ) {

console.error( 'WebGPURenderer: RenderTarget with antialiasing is not supported yet.' );
return;

}

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

colorAttachment.attachment = renderTargetProperties.colorTextureGPU.createView();
Expand Down Expand Up @@ -669,7 +662,7 @@ class WebGPURenderer {

if ( this._colorBuffer ) this._colorBuffer.destroy();

this._colorBuffer = this._device.createTexture({
this._colorBuffer = this._device.createTexture( {
size: {
width: this._width * this._pixelRatio,
height: this._height * this._pixelRatio,
Expand All @@ -678,7 +671,7 @@ class WebGPURenderer {
sampleCount: this.parameters.sampleCount,
format: GPUTextureFormat.BRGA8Unorm,
usage: GPUTextureUsage.OUTPUT_ATTACHMENT
});
} );

}

Expand Down Expand Up @@ -706,6 +699,7 @@ class WebGPURenderer {
}

}

}

async function initWebGPU( scope ) {
Expand Down

0 comments on commit 00cabc4

Please sign in to comment.