|
@@ -28,18 +28,6 @@ class WebGPUBackend extends Backend {
|
|
|
// some parameters require default values other than "undefined"
|
|
|
this.parameters.alpha = ( parameters.alpha === undefined ) ? true : parameters.alpha;
|
|
|
|
|
|
- this.parameters.antialias = ( parameters.antialias === true );
|
|
|
-
|
|
|
- if ( this.parameters.antialias === true ) {
|
|
|
-
|
|
|
- this.parameters.sampleCount = ( parameters.sampleCount === undefined ) ? 4 : parameters.sampleCount;
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
- this.parameters.sampleCount = 1;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
this.parameters.requiredLimits = ( parameters.requiredLimits === undefined ) ? {} : parameters.requiredLimits;
|
|
|
|
|
|
this.trackTimestamp = ( parameters.trackTimestamp === true );
|
|
@@ -153,8 +141,6 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
let descriptor = this.defaultRenderPassdescriptor;
|
|
|
|
|
|
- const antialias = this.parameters.antialias;
|
|
|
-
|
|
|
if ( descriptor === null ) {
|
|
|
|
|
|
const renderer = this.renderer;
|
|
@@ -170,7 +156,7 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
const colorAttachment = descriptor.colorAttachments[ 0 ];
|
|
|
|
|
|
- if ( antialias === true ) {
|
|
|
+ if ( this.renderer.samples > 0 ) {
|
|
|
|
|
|
colorAttachment.view = this.colorBuffer.createView();
|
|
|
|
|
@@ -186,7 +172,7 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
const colorAttachment = descriptor.colorAttachments[ 0 ];
|
|
|
|
|
|
- if ( antialias === true ) {
|
|
|
+ if ( this.renderer.samples > 0 ) {
|
|
|
|
|
|
colorAttachment.resolveTarget = this.context.getCurrentTexture().createView();
|
|
|
|
|
@@ -269,7 +255,7 @@ class WebGPUBackend extends Backend {
|
|
|
const depthTextureData = this.get( renderContext.depthTexture );
|
|
|
|
|
|
const depthStencilAttachment = {
|
|
|
- view: depthTextureData.texture.createView(),
|
|
|
+ view: depthTextureData.texture.createView()
|
|
|
};
|
|
|
|
|
|
descriptor = {
|
|
@@ -976,7 +962,7 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
const utils = this.utils;
|
|
|
|
|
|
- const sampleCount = utils.getSampleCount( renderObject.context );
|
|
|
+ const sampleCount = utils.getSampleCountRenderContext( renderObject.context );
|
|
|
const colorSpace = utils.getCurrentColorSpace( renderObject.context );
|
|
|
const colorFormat = utils.getCurrentColorFormat( renderObject.context );
|
|
|
const depthStencilFormat = utils.getCurrentDepthStencilFormat( renderObject.context );
|
|
@@ -1041,7 +1027,7 @@ class WebGPUBackend extends Backend {
|
|
|
material.stencilFail, material.stencilZFail, material.stencilZPass,
|
|
|
material.stencilFuncMask, material.stencilWriteMask,
|
|
|
material.side,
|
|
|
- utils.getSampleCount( renderContext ),
|
|
|
+ utils.getSampleCountRenderContext( renderContext ),
|
|
|
utils.getCurrentColorSpace( renderContext ), utils.getCurrentColorFormat( renderContext ), utils.getCurrentDepthStencilFormat( renderContext ),
|
|
|
utils.getPrimitiveTopology( object, material ),
|
|
|
renderObject.clippingContextVersion
|