|
@@ -2923,6 +2923,7 @@ class RenderTarget extends EventDispatcher {
|
|
minFilter: LinearFilter,
|
|
minFilter: LinearFilter,
|
|
depthBuffer: true,
|
|
depthBuffer: true,
|
|
stencilBuffer: false,
|
|
stencilBuffer: false,
|
|
|
|
+ resolveStencilBuffer: true,
|
|
depthTexture: null,
|
|
depthTexture: null,
|
|
samples: 0,
|
|
samples: 0,
|
|
count: 1
|
|
count: 1
|
|
@@ -2947,6 +2948,8 @@ class RenderTarget extends EventDispatcher {
|
|
this.depthBuffer = options.depthBuffer;
|
|
this.depthBuffer = options.depthBuffer;
|
|
this.stencilBuffer = options.stencilBuffer;
|
|
this.stencilBuffer = options.stencilBuffer;
|
|
|
|
|
|
|
|
+ this.resolveStencilBuffer = options.resolveStencilBuffer;
|
|
|
|
+
|
|
this.depthTexture = options.depthTexture;
|
|
this.depthTexture = options.depthTexture;
|
|
|
|
|
|
this.samples = options.samples;
|
|
this.samples = options.samples;
|
|
@@ -3024,6 +3027,8 @@ class RenderTarget extends EventDispatcher {
|
|
this.depthBuffer = source.depthBuffer;
|
|
this.depthBuffer = source.depthBuffer;
|
|
this.stencilBuffer = source.stencilBuffer;
|
|
this.stencilBuffer = source.stencilBuffer;
|
|
|
|
|
|
|
|
+ this.resolveStencilBuffer = source.resolveStencilBuffer;
|
|
|
|
+
|
|
if ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();
|
|
if ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();
|
|
|
|
|
|
this.samples = source.samples;
|
|
this.samples = source.samples;
|
|
@@ -25540,7 +25545,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
// resolving stencil is slow with a D3D backend. disable it for all transmission render targets (see #27799)
|
|
// resolving stencil is slow with a D3D backend. disable it for all transmission render targets (see #27799)
|
|
|
|
|
|
- if ( renderTarget.stencilBuffer && renderTargetProperties.__isTransmissionRenderTarget !== true ) mask |= _gl.STENCIL_BUFFER_BIT;
|
|
|
|
|
|
+ if ( renderTarget.stencilBuffer && renderTarget.resolveStencilBuffer ) mask |= _gl.STENCIL_BUFFER_BIT;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -29516,12 +29521,10 @@ class WebGLRenderer {
|
|
type: ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ) ? HalfFloatType : UnsignedByteType,
|
|
type: ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ) ? HalfFloatType : UnsignedByteType,
|
|
minFilter: LinearMipmapLinearFilter,
|
|
minFilter: LinearMipmapLinearFilter,
|
|
samples: 4,
|
|
samples: 4,
|
|
- stencilBuffer: stencil
|
|
|
|
|
|
+ stencilBuffer: stencil,
|
|
|
|
+ resolveStencilBuffer: false
|
|
} );
|
|
} );
|
|
|
|
|
|
- const renderTargetProperties = properties.get( currentRenderState.state.transmissionRenderTarget );
|
|
|
|
- renderTargetProperties.__isTransmissionRenderTarget = true;
|
|
|
|
-
|
|
|
|
// debug
|
|
// debug
|
|
|
|
|
|
/*
|
|
/*
|