Skip to content

Multi-pass rendering optimization in renderer level 1 & level 2 #1779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TheJJ opened this issue May 19, 2025 · 1 comment
Open

Multi-pass rendering optimization in renderer level 1 & level 2 #1779

TheJJ opened this issue May 19, 2025 · 1 comment
Labels
area: renderer Concerns our graphics renderer improvement Enhancement of an existing component

Comments

@TheJJ
Copy link
Member

TheJJ commented May 19, 2025

In #1645 we implemented rendering layers, but there's some optimization still possible.
my idea there was (and we should discuss/continue from there):

The renderer has two "levels", the high level variant is level 2, the lower level (closer to opengl instructions) is level 1.

We should have something layer-like (ordered multi-pass rendering) in both renderer levels.

There's basically two things to do multiple passes in renderer "level 1" to draw their layers:

  • objects (town center e.g.) -> draw shadows, their building parts
  • terrain -> overlay and blending

Layer 2 render passes could use layer/pass features in layer1 then, if it makes sense.

To prevent binding the framebuffer when drawing in layer 1 too often, the resulting layer1 instructions somehow have to be batched (so the buffer can remain to be bound in the correct order) - this was our long-term idea for the multiple layers anyway.

Concrete idea to implement this:

  • renderer users submit all render instructions to the renderer as they need them
    • and have it all in memory, yes
    • but later we could optimize maybe by processing one map area after the other? especially when zoomed out)
  • re-order and optimize (minimize binding switches of textures, shaders, ...) the draw instructions
  • from this optimized list, perform the draw calls (to the correct framebuffer) with minimal binding switches (we ordered for that just before)
@TheJJ TheJJ added improvement Enhancement of an existing component area: renderer Concerns our graphics renderer labels May 19, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in openage renderer May 19, 2025
@heinezen
Copy link
Member

heinezen commented May 19, 2025

see also #1535

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: renderer Concerns our graphics renderer improvement Enhancement of an existing component
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants