]> git.tdb.fi Git - libs/gl.git/commitdiff
Enable shadow map for the blended method when exporting
authorMikko Rasa <tdb@tdb.fi>
Fri, 11 Mar 2022 09:25:46 +0000 (11:25 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 11 Mar 2022 09:25:46 +0000 (11:25 +0200)
Blended objects may want to receive shadows even though they can't
cast them.

blender/io_mspgl/export_scene.py

index 78ce2cbd5a69b2329337e72e5ae499b8c9dc513e..ac3bf0be184e31999e285eeb54c3a29c16c1dcfd 100644 (file)
@@ -192,6 +192,7 @@ class SceneExporter:
 
                        st = Statement("effect", "shadow_map")
                        st.sub.append(Statement("type", Token("shadow_map")))
+                       st.sub.append(Statement("enable_for_method", "blended"))
                        st.sub.append(Statement("size", *self.compute_shadowmap_size(shadowed_lights)))
                        target, radius = self.compute_bounding_sphere(shadow_casters)
                        st.sub.append(Statement("target", *target))