watercolor-games / the-peacenet

Welcome to The Peacenet, a futuristic open-world hacking game built on the Peace Engine.
https://watercolorgames.net/
GNU General Public License v3.0
5 stars 1 forks source link

Stop using RenderTarget2D for user interface elements. #2

Closed ghost closed 6 years ago

ghost commented 6 years ago

Historically in Peace Engine, render targets have been used for ensuring UI elements render within their proper bounds, and ensuring that things like opacity effects work properly.

However, this stuff can all be done with scissoring and shaders respectively. In order for this to be done however, we need to figure out just how far we can push things like TextRenderer performance-wise. I sense we'll end up redrawing the entire UI every frame, so...making all the engine draw routines as efficient as possible is paramount.

ghost commented 6 years ago

This is fixed, it seems. Now we only use RenderTargets if we're dealing with semitranslucency. Game runs very well now.