- when post-processing is off - when rendering direct-volumes
@@ -6,6 +6,8 @@ Note that since we don't clearly distinguish between a public and private interf
## [Unreleased]
+- Fix Dual depth peeling when post-processing is off or when rendering direct-volumes
+
## [v3.18.0] - 2022-09-17
- Integration of Dual depth peeling - OIT method
@@ -153,6 +153,8 @@ export class DrawPass {
this.postprocessing.render(camera, false, transparentBackground, renderer.props.backgroundColor, postprocessingProps);
}
+ this.depthTextureOpaque.detachFramebuffer(this.colorTarget.framebuffer, 'depth');
// render transparent primitives
if (scene.opacityAverage < 1) {
const target = PostprocessingPass.isEnabled(postprocessingProps)
@@ -37,7 +37,7 @@ export const dpoit_write = `
// back color is separately blend afterwards each pass
gl_FragData[1] = vec4(0.0);
- float nearestDepth = - lastDepth.x;
+ float nearestDepth = -lastDepth.x;
float furthestDepth = lastDepth.y;
float alphaMultiplier = 1.0 - lastFrontColor.a;