diff --git a/korman/exporter/material.py b/korman/exporter/material.py index bd58990..b4ea99b 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -206,6 +206,8 @@ class MaterialConverter: layer.opacity = layer_props.opacity / 100 if layer_props.opacity < 100: state.blendFlags |= hsGMatState.kBlendAlpha + if layer_props.alpha_halo: + state.blendFlags |= hsGMatState.kBlendAlphaTestHigh # Export the specific texture type self._tex_exporters[texture.type](bo, hsgmat, layer, slot) diff --git a/korman/properties/prop_texture.py b/korman/properties/prop_texture.py index bf532bb..7979881 100644 --- a/korman/properties/prop_texture.py +++ b/korman/properties/prop_texture.py @@ -31,6 +31,9 @@ class PlasmaLayer(bpy.types.PropertyGroup): min=0, max=100, subtype="PERCENTAGE") + alpha_halo = BoolProperty(name="Fix Alpha Halo", + description="Fixes halos seen around semitransparent objects resulting from sorting errors", + default=False) envmap_color = FloatVectorProperty(name="Environment Map Color", description="The default background color rendered onto the Environment Map", diff --git a/korman/ui/ui_texture.py b/korman/ui/ui_texture.py index 8316a70..78190fa 100644 --- a/korman/ui/ui_texture.py +++ b/korman/ui/ui_texture.py @@ -77,3 +77,4 @@ class PlasmaLayerPanel(TextureButtonsPanel, bpy.types.Panel): col = split.column() col.label("General:") col.prop(layer_props, "opacity", text="Opacity") + col.prop(layer_props, "alpha_halo")