Wednesday, February 1, 2017

FMod - Consistent tileinfo opacity

I noticed while adding the foreground highlight that the tile properties render plane behaved differently depending on whether it was drawing the level for the first time. (For performance reasons that may or may not make a difference, the "render the whole level" method doesn't use the "render this one changed tile" method.) Specifically, when replacing a tile, it uses a ColorMatrix to change the alpha component, but that doesn't happen for the first render pass. Therefore, tiles placed after loading the level get a brighter-looking tile property overlay. That's pretty strange, and the visual effect can be replicated perfectly fine by changing the color in the config file if desired, so I removed that extra complication to make it consistent.

No comments:

Post a Comment