It’s been two months of an architectural overhaul for the Bright Engine render pipeline. The engineering team have been making substantial changes to how the engine draws the scene, resulting in significant performance boosts without loss of graphical fidelity. Let’s dive under the hood to see what’s changed.
A Huge Thank you to our Patrons! Your contributions make Bright Engine Possible!
Zeppot • Daniel Burkhart • Massum Zaidi • Mark Makarainen
Improvement: Rendering Architecture
All too often, duplicate data would be loaded into memory even though it wasn’t needed or ever used. And in some cases, it even caused tiny memory leaks that built up in the background. This was particularly noticeable when switching between different zones.
Needless to say, that’s not good. But rather than continue with the bandaid solutions we’ve been using so far, we decided to rip out the old system entirely and put in a new one. And the results are pretty encouraging with a 25% drop in memory usage.
Improvement: Vertex and Image Cache Optimisation
Improvement: Shader Performance
Shaders also got some love in this update. Until now, all uniform variables have been sent one by one by the CPU to the GPU each frame for each shader. While sending uniform variables in this fashion isn’t particularly processor-intensive, it does result in some notable idling by the GPU, and that is wasted performance.
Fortunately, there is a marvellous creation called Uniform Buffer Objects (UBOs) that allows us to overcome this problem. Instead of sending the data in pieces, Bright Engine now stores the data into UBOs which are sent to the GPU only once per frame. Needless to say, it’s a lot faster, reducing work for the CPU, and letting the GPU get started with its rendering tasks, that much sooner.
We also did some adjustments to the PBR shader adding new optimisations to point and spotlights calculations. And the dynamic foliage shader had a good chunk of duplicate calculation code removed for good measure.
- Fixed bug where SSAO texture was not being blurred correctly resulting in screen-space artefacts
- Fixed bug where GPU was still trying to calculate point light shadows even if no shadow-casting light source was in the scene (performance)
- Fixed bug where GPU was still trying to calculate spotlight shadows even if no shadow-casting light source was in the scene (performance)
- Fixed bug where scene depth data was being written into alpha channel of gBuffer Scene Albedo Map
- Fixed bug where the terrain would be fully emissive is no emission map was assigned to a layer
- Fixed bug where generated wind noise texture was being bound once per terrain chunk instead of just once per frame
- Fixed bug where a light's illuminance value wouldn't respect timeline settings
- Fixed bug where the units for a spot light's inner and outer radius were incorrectly displayed