|
|
@@ -5,7 +5,7 @@ import { context } from '../tsl/TSLBase.js';
|
|
|
import { uniform } from '../core/UniformNode.js';
|
|
|
import { viewZToOrthographicDepth, perspectiveDepthToViewZ } from './ViewportDepthNode.js';
|
|
|
|
|
|
-import { HalfFloatType/*, FloatType*/ } from '../../constants.js';
|
|
|
+import { HalfFloatType, FloatType } from '../../constants.js';
|
|
|
import { Vector2 } from '../../math/Vector2.js';
|
|
|
import { Vector4 } from '../../math/Vector4.js';
|
|
|
import { DepthTexture } from '../../textures/DepthTexture.js';
|
|
|
@@ -757,6 +757,12 @@ class PassNode extends TempNode {
|
|
|
|
|
|
this.renderTarget.texture.type = renderer.getOutputBufferType();
|
|
|
|
|
|
+ if ( renderer.reversedDepthBuffer === true ) {
|
|
|
+
|
|
|
+ this.renderTarget.depthTexture.type = FloatType;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
return this.scope === PassNode.COLOR ? this.getTextureNode() : this.getLinearDepthNode();
|
|
|
|
|
|
}
|