]> git.tdb.fi Git - libs/gl.git/commitdiff
Use alpha to coverage when exporting materials with alpha cutoff
authorMikko Rasa <tdb@tdb.fi>
Sat, 23 Apr 2022 21:31:03 +0000 (00:31 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 23 Apr 2022 21:33:00 +0000 (00:33 +0300)
blender/io_mspgl/export_material.py

index 64d11b8689bc90806349aaab6df375869e187a7f..4c40757f395421608ea13079d1b68fcae57c9c6c 100644 (file)
@@ -88,6 +88,10 @@ class MaterialExporter:
 
                        if blend_st:
                                st.sub.append(blend_st)
+                       elif material.alpha_cutoff>0.0:
+                               ss = Statement("blend")
+                               ss.sub.append(Statement("alpha_to_coverage", True))
+                               st.sub.append(ss)
                        if material.receive_shadows:
                                st.sub.append(Statement("receive_shadows", True))
                        if material.image_based_lighting: