|
|
@@ -251,22 +251,14 @@ class PassNode extends TempNode {
|
|
|
*/
|
|
|
this._height = 1;
|
|
|
|
|
|
+ const depthTexture = new DepthTexture();
|
|
|
+ depthTexture.isRenderTargetTexture = true;
|
|
|
+ //depthTexture.type = FloatType;
|
|
|
+ depthTexture.name = 'depth';
|
|
|
+
|
|
|
const renderTarget = new RenderTarget( this._width * this._pixelRatio, this._height * this._pixelRatio, { type: HalfFloatType, ...options, } );
|
|
|
renderTarget.texture.name = 'output';
|
|
|
-
|
|
|
- let depthTexture = null;
|
|
|
-
|
|
|
- if ( this.scope === PassNode.DEPTH || options.depthBuffer !== false ) {
|
|
|
-
|
|
|
- depthTexture = new DepthTexture();
|
|
|
- depthTexture.isRenderTargetTexture = true;
|
|
|
- //depthTexture.type = FloatType;
|
|
|
- depthTexture.name = 'depth';
|
|
|
-
|
|
|
- renderTarget.depthTexture = depthTexture;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ renderTarget.depthTexture = depthTexture;
|
|
|
|
|
|
/**
|
|
|
* The pass's render target.
|
|
|
@@ -318,18 +310,13 @@ class PassNode extends TempNode {
|
|
|
* A dictionary holding the internal result textures.
|
|
|
*
|
|
|
* @private
|
|
|
- * @type {{ output: Texture, depth?: DepthTexture }}
|
|
|
+ * @type {Object<string, Texture>}
|
|
|
*/
|
|
|
this._textures = {
|
|
|
- output: renderTarget.texture
|
|
|
+ output: renderTarget.texture,
|
|
|
+ depth: depthTexture
|
|
|
};
|
|
|
|
|
|
- if ( depthTexture !== null ) {
|
|
|
-
|
|
|
- this._textures.depth = depthTexture;
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* A dictionary holding the internal texture nodes.
|
|
|
*
|
|
|
@@ -770,7 +757,7 @@ class PassNode extends TempNode {
|
|
|
|
|
|
this.renderTarget.texture.type = renderer.getOutputBufferType();
|
|
|
|
|
|
- if ( renderer.reversedDepthBuffer === true && this.renderTarget.depthTexture !== null ) {
|
|
|
+ if ( renderer.reversedDepthBuffer === true ) {
|
|
|
|
|
|
this.renderTarget.depthTexture.type = FloatType;
|
|
|
|