From ac2ba92e1b6ec061a8bcdef3fbf0a89231c140c5 Mon Sep 17 00:00:00 2001 From: "David H. Rogers" Date: Tue, 5 Nov 2024 09:26:05 -0700 Subject: [PATCH] update --- scripts/cinematic | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/cinematic b/scripts/cinematic index d71e333..9bc8c58 100755 --- a/scripts/cinematic +++ b/scripts/cinematic @@ -107,9 +107,31 @@ class Element: self.colormap.inputs.channel.set(element['channel'], False) # name of the channel that needs to be rendered self.colormap.inputs.images.set(self.imReader.outputs.images, False) self.colormap.inputs.composition_id.set(-1, False) - + # set output self.outputs = self.colormap.outputs + # shadow + if 'shadow' in config: + if not 'state' in config['shadow'] or config['shadow']['state']: + if not 'shadow' in config or config['shadow']['type'] == 'SSAO': + shadow = config['shadow'] + self.shadow = pycinema.filters.ShaderSSAO() + self.shadow.inputs.images.set(self.colormap.outputs.images, False) + # other settings + if 'radius' in shadow: + self.shadow.inputs.radius.set(shadow['radius']) + else: + self.shadow.inputs.radius.set(0.03) + if 'samples' in shadow: + self.shadow.inputs.samples.set(shadow['samples']) + else: + self.shadow.inputs.samples.set(32) + if 'diff' in shadow: + self.shadow.inputs.diff.set(shadow['diff']) + else: + self.shadow.inputs.diff.set(0.5) + # set output + self.outputs = self.shadow.outputs def function_composite(args):