From c0b39b49c15845d5f239ab65262a51835a6ca1c9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 24 Apr 2022 00:31:03 +0300 Subject: [PATCH] Use alpha to coverage when exporting materials with alpha cutoff --- blender/io_mspgl/export_material.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blender/io_mspgl/export_material.py b/blender/io_mspgl/export_material.py index 64d11b86..4c40757f 100644 --- a/blender/io_mspgl/export_material.py +++ b/blender/io_mspgl/export_material.py @@ -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: -- 2.45.2