From 5dbca41da6e4957650e974dbd78ecd1c65133846 Mon Sep 17 00:00:00 2001 From: Alexander Rose <alexander.rose@weirdbyte.de> Date: Sat, 18 Mar 2023 19:01:33 -0700 Subject: [PATCH] fix blurry occlusion in screenshots --- CHANGELOG.md | 1 + src/mol-plugin/util/viewport-screenshot.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a502f069d..4b5a486a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Note that since we don't clearly distinguish between a public and private interf - Fix occlusion artefact with non-canvas viewport and pixel-ratio > 1 - Update nodejs-shims conditionals to handle polyfilled document object in NodeJS environment. - Ensure marking edges are at least one pixel wide +- Fix blurry occlusion in screenshots ## [v3.31.4] - 2023-02-24 diff --git a/src/mol-plugin/util/viewport-screenshot.ts b/src/mol-plugin/util/viewport-screenshot.ts index 97368fde6..820d0525d 100644 --- a/src/mol-plugin/util/viewport-screenshot.ts +++ b/src/mol-plugin/util/viewport-screenshot.ts @@ -119,7 +119,7 @@ class ViewportScreenshotHelper extends PluginComponent { postprocessing: { ...c.props.postprocessing, occlusion: aoProps.name === 'on' - ? { name: 'on', params: { ...aoProps.params, samples: 128, resolutionScale: 1 } } + ? { name: 'on', params: { ...aoProps.params, samples: 128, resolutionScale: c.webgl.pixelRatio } } : aoProps }, marking: { ...c.props.marking } @@ -143,7 +143,7 @@ class ViewportScreenshotHelper extends PluginComponent { postprocessing: { ...c.props.postprocessing, occlusion: aoProps.name === 'on' - ? { name: 'on', params: { ...aoProps.params, samples: 128, resolutionScale: 1 } } + ? { name: 'on', params: { ...aoProps.params, samples: 128, resolutionScale: c.webgl.pixelRatio } } : aoProps }, marking: { ...c.props.marking } -- GitLab