diff --git a/src/mol-canvas3d/passes/draw.ts b/src/mol-canvas3d/passes/draw.ts index 1f6c5549bc2169e74b09f6246446930781db242b..2f8942215ebd170c0ea13252f7550a79b9ba27fb 100644 --- a/src/mol-canvas3d/passes/draw.ts +++ b/src/mol-canvas3d/passes/draw.ts @@ -142,7 +142,7 @@ export class DrawPass { } if (PostprocessingPass.isEnabled(postprocessingProps)) { - if (PostprocessingPass.isOutlineEnabled(postprocessingProps)) { + if (PostprocessingPass.isTransparentOutlineEnabled(postprocessingProps)) { this.depthTargetTransparent.bind(); renderer.clearDepth(true); if (scene.opacityAverage < 1) { @@ -196,7 +196,7 @@ export class DrawPass { } if (PostprocessingPass.isEnabled(postprocessingProps)) { - if (PostprocessingPass.isOutlineEnabled(postprocessingProps)) { + if (PostprocessingPass.isTransparentOutlineEnabled(postprocessingProps)) { this.depthTargetTransparent.bind(); renderer.clearDepth(true); if (scene.opacityAverage < 1) { @@ -260,7 +260,7 @@ export class DrawPass { this.colorTarget.depthRenderbuffer?.detachFramebuffer(this.postprocessing.target.framebuffer); } - if (PostprocessingPass.isOutlineEnabled(postprocessingProps)) { + if (PostprocessingPass.isTransparentOutlineEnabled(postprocessingProps)) { this.depthTargetTransparent.bind(); renderer.clearDepth(true); if (scene.opacityAverage < 1) { diff --git a/src/mol-canvas3d/passes/postprocessing.ts b/src/mol-canvas3d/passes/postprocessing.ts index fd61d28af312d55694827f8bbd312483ddf8dff1..d3b70b80b74b275bc9cc5b002a00d12ae8f0c5cc 100644 --- a/src/mol-canvas3d/passes/postprocessing.ts +++ b/src/mol-canvas3d/passes/postprocessing.ts @@ -383,8 +383,8 @@ export class PostprocessingPass { return props.occlusion.name === 'on' || props.shadow.name === 'on' || props.outline.name === 'on' || props.background.variant.name !== 'off'; } - static isOutlineEnabled(props: PostprocessingProps) { - return props.outline.name === 'on'; + static isTransparentOutlineEnabled(props: PostprocessingProps) { + return props.outline.name === 'on' && props.outline.params.includeTransparent; } readonly target: RenderTarget;