From 7b130dc0f34e2d7b8f213fbf6e1142480ea3dce1 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alexander.rose@weirdbyte.de>
Date: Sat, 26 Nov 2022 22:09:24 -0800
Subject: [PATCH] cleanup

---
 src/examples/lighting/index.ts               | 16 ++--------------
 src/mol-plugin-ui/structure/quick-styles.tsx |  4 +++-
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/src/examples/lighting/index.ts b/src/examples/lighting/index.ts
index 9365e7a79..a71bff56a 100644
--- a/src/examples/lighting/index.ts
+++ b/src/examples/lighting/index.ts
@@ -24,13 +24,7 @@ const Canvas3DPresets = {
     illustrative: {
         canvas3d: <Preset>{
             postprocessing: {
-                occlusion: { name: 'on', params: {
-                    bias: 0.8,
-                    blurKernelSize: 15,
-                    radius: 5,
-                    samples: 32,
-                    resolutionScale: 1,
-                } },
+                occlusion: { name: 'on', params: { samples: 32, radius: 6, bias: 1.4, blurKernelSize: 15, resolutionScale: 1 } },
                 outline: { name: 'on', params: { scale: 1, threshold: 0.33, color: Color(0x000000) } },
                 shadow: { name: 'off', params: {} },
             },
@@ -43,13 +37,7 @@ const Canvas3DPresets = {
     occlusion: {
         canvas3d: <Preset>{
             postprocessing: {
-                occlusion: { name: 'on', params: {
-                    bias: 0.8,
-                    blurKernelSize: 15,
-                    radius: 5,
-                    samples: 32,
-                    resolutionScale: 1,
-                } },
+                occlusion: { name: 'on', params: { samples: 32, radius: 6, bias: 1.4, blurKernelSize: 15, resolutionScale: 1 } },
                 outline: { name: 'off', params: {} },
                 shadow: { name: 'off', params: {} },
             },
diff --git a/src/mol-plugin-ui/structure/quick-styles.tsx b/src/mol-plugin-ui/structure/quick-styles.tsx
index e60102ac3..ef3078b03 100644
--- a/src/mol-plugin-ui/structure/quick-styles.tsx
+++ b/src/mol-plugin-ui/structure/quick-styles.tsx
@@ -83,7 +83,9 @@ export class QuickStyles extends PurePluginUIComponent {
                     },
                     occlusion: {
                         name: 'on',
-                        params: { bias: 0.8, blurKernelSize: 15, radius: 5, samples: 32, resolutionScale: 1 }
+                        params: pp.occlusion.name === 'on'
+                            ? pp.occlusion.params
+                            : { bias: 0.8, blurKernelSize: 15, radius: 5, samples: 32, resolutionScale: 1 }
                     },
                     shadow: { name: 'off', params: {} },
                 }
-- 
GitLab