Browse Source

Pass the `blockRGB` argument to xDynTextLoc in the Localized Text

Modifier.

Doing this greatly improves the result of the text rendered to the
dynamic text map when alpha blending is in use.
pull/374/head
Adam Johnson 1 year ago
parent
commit
367f831cc7
  1. 5
      korman/properties/modifiers/render.py

5
korman/properties/modifiers/render.py

@ -635,6 +635,7 @@ _LOCALIZED_TEXT_PFM = (
{ 'id': 16, 'type': "ptAttribFloat", 'name': "clearColorG" },
{ 'id': 17, 'type': "ptAttribFloat", 'name': "clearColorB" },
{ 'id': 18, 'type': "ptAttribFloat", 'name': "clearColorA" },
{ 'id': 19, 'type': "ptAttribBoolean", 'name': "blockRGB" },
)
class PlasmaLocalizedTextModifier(PlasmaModifierProperties, PlasmaModifierLogicWiz, TranslationMixin):
@ -749,6 +750,10 @@ class PlasmaLocalizedTextModifier(PlasmaModifierProperties, PlasmaModifierLogicW
self._create_python_attribute(pfm_node, "clearColorB", value=clear_color[2])
self._create_python_attribute(pfm_node, "clearColorA", value=1.0)
# BlockRGB is some weird flag the engine uses to properly render when the DynaTextMap has
# alpha. Why the engine can't figure this out on its own is beyond me.
self._create_python_attribute(pfm_node, "blockRGB", value=self.texture.use_alpha)
@property
def localization_set(self):
return "DynaTexts"

Loading…
Cancel
Save