From 367f831cc7e3192ae4313d3e70b51b05cac7b92a Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 11 Jun 2023 18:02:09 -0400 Subject: [PATCH] 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. --- korman/properties/modifiers/render.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/korman/properties/modifiers/render.py b/korman/properties/modifiers/render.py index b0c6d4b..14972a3 100644 --- a/korman/properties/modifiers/render.py +++ b/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"