Browse Source

kBlendAlpha is illegal with kBlendAlphaMult and kBlendAlphaAdd

pull/25/head
Adam Johnson 8 years ago
parent
commit
9cbb9b791a
  1. 3
      korman/exporter/material.py

3
korman/exporter/material.py

@ -432,11 +432,12 @@ class MaterialConverter:
if not slot.use_stencil:
# mutually exclusive blend flags
if texture.use_alpha and has_alpha:
state.blendFlags |= hsGMatState.kBlendAlpha
if slot.blend_type == "ADD":
state.blendFlags |= hsGMatState.kBlendAlphaAdd
elif slot.blend_type == "MULTIPLY":
state.blendFlags |= hsGMatState.kBlendAlphaMult
else:
state.blendFlags |= hsGMatState.kBlendAlpha
if texture.invert_alpha and has_alpha:
state.blendFlags |= hsGMatState.kBlendInvertAlpha

Loading…
Cancel
Save