From fefc6f14c93af660d7474b9acee675add5a8d1c3 Mon Sep 17 00:00:00 2001 From: Alice Russell <arussell@exscientia.co.uk> Date: Mon, 12 Dec 2022 10:43:14 +0000 Subject: [PATCH] Change is outline enabled to is transparant outline enabled --- src/mol-canvas3d/passes/draw.ts | 6 +++--- src/mol-canvas3d/passes/postprocessing.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mol-canvas3d/passes/draw.ts b/src/mol-canvas3d/passes/draw.ts index 1f6c5549b..2f8942215 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 fd61d28af..d3b70b80b 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; -- GitLab