Perform unit highlight and frame tint effects in hardware #6823
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I managed to get an effect that reproduces previous behaviour.
Some improvements could be made for things like the unit poisoning tint effect, but it would probably be better to revisit this when using GPU shaders is a possibility.
For now this does some semi-nasty hacks involving blitting one to four copies of the image depending on the effects used. This is still very cheap to do in hardware, so is fine for now. This should greatly improve performance for effects that animate colour tint, such as the flashing effect when clicking on an owned unit and some missile effects.
The tint effect is 1:1 identical to that in 1.16 for fully opaque pixels. It may differ slightly for translucent pixels. There's not much that can be done about that without shaders.