]> git.tdb.fi Git - libs/gl.git/commitdiff
Disable depth writes for blended rendering steps
authorMikko Rasa <tdb@tdb.fi>
Mon, 10 Oct 2022 07:23:46 +0000 (10:23 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 10 Oct 2022 07:23:46 +0000 (10:23 +0300)
blender/io_mspgl/export_scene.py

index dce52f0132345690b16002308b0e8453e5e751fe..d2cc48fce82b8bef45b901f18e51b268be2b9a4a 100644 (file)
@@ -278,7 +278,13 @@ class SceneExporter:
 
                for t in tags:
                        st = Statement("step", t, renderable)
-                       st.sub.append(Statement("depth_test", Token("LEQUAL")))
+                       if t=="blended":
+                               ss = Statement("depth_test")
+                               ss.sub.append(Statement("compare", Token("LEQUAL")))
+                               ss.sub.append(Statement("write", False))
+                               st.sub.append(ss)
+                       else:
+                               st.sub.append(Statement("depth_test", Token("LEQUAL")))
                        if lighting:
                                st.sub.append(seq_res.create_reference_statement("lighting", lighting))
                        seq_res.statements.append(st)