openage icon indicating copy to clipboard operation
openage copied to clipboard

Render pipeline optimization

Open heinezen opened this issue 2 years ago • 0 comments

Ideally, the renderer must be able to handle several thousands of objects without significant performance loss. While we're not processing super complex geometry like other engines, it's good to keep performance in mind, so that system requirements stay low. There are a few general techniques that we can use:

Pre-rendering Optimizations

  • [x] https://github.com/SFTtech/openage/issues/1534
  • [ ] https://github.com/SFTtech/openage/issues/1536
  • [ ] https://github.com/SFTtech/openage/issues/1537
  • [ ] https://github.com/SFTtech/openage/issues/1535
  • [x] https://github.com/SFTtech/openage/issues/1053

Rendering optimizations

  • Geometry shader for sprites: Draw sprites by passing a single vertex using GL_POINT and calculate the the 4 sprite corners in the geometry shader. This offloads some of the sprite scaling/positioning to the GPU.
  • [ ] https://github.com/SFTtech/openage/issues/1538
  • [ ] https://github.com/SFTtech/openage/issues/1539

heinezen avatar Apr 14 '23 22:04 heinezen