Browse Source

Alpha Vertex Color Toggle

Adds a per-layer toggle to use the Alpha VCol values and blend the texture
pull/258/head
Patrick Dulebohn 3 years ago
parent
commit
e1bbfed16d
  1. 5
      korman/exporter/material.py
  2. 3
      korman/properties/prop_texture.py

5
korman/exporter/material.py

@ -509,7 +509,10 @@ class MaterialConverter:
else:
layer_props = texture.plasma_layer
layer.opacity = layer_props.opacity / 100
self._handle_layer_opacity(layer, layer_props.opacity)
if layer_props.opacity < 100 and not state.blendFlags & hsGMatState.kBlendMask:
state.blendFlags |= hsGMatState.kBlendAlpha
if layer_props.use_alpha_vcol:
state.blendFlags |= hsGMatState.kBlendAlpha
if layer_props.alpha_halo:
state.blendFlags |= hsGMatState.kBlendAlphaTestHigh
if layer_props.z_bias:

3
korman/properties/prop_texture.py

@ -38,6 +38,9 @@ class PlasmaLayer(bpy.types.PropertyGroup):
description="Opacity of the texture",
default=100.0, min=0.0, max=100.0,
precision=0, subtype="PERCENTAGE")
use_alpha_vcol = BoolProperty(name="Use Alpha VCol",
description="Texture uses the Alpha vertex color values",
default=False)
alpha_halo = BoolProperty(name="High Alpha Test",
description="Fixes halos seen around semitransparent objects resulting from sorting errors",
default=False)

Loading…
Cancel
Save