Multi-pass rendering optimization in renderer level 1 & level 2
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the existing rendering layers from #1645 through renderer levels 1 and 2, then follow how render instructions are submitted and draw calls bind framebuffers, textures, and shaders. Done means both levels support ordered multi-pass rendering with batched instructions and fewer binding switches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100