-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Layer support in renderer #1645
Conversation
9117cfc
to
5a0d62e
Compare
afd633f
to
a340443
Compare
@TheJJ There might be a better approach to do layer support, so your input would be nice to have. In this PR, I added layer suppport into the level 1 renderer (in Here are some advantages/disadvantages I see with each approach: Layer support in Level 1 (this PR)
Layer support in Level 2 We could do this by emulating each layer with an individual render pass per layer. These passes would all target the same framebuffer.
|
Generation used column-major instead of row-major ordering.
Because it could be very expensive.
a340443
to
52663d6
Compare
LG2M |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
let's use this working approach for now, but some thoughts on the alternative: having this approach now certailiny works, and we can optimize it further. since the only real layer users are objects (town center e.g.) and the terrain, they can do multiple layer1-passes to draw their layers. to reduce the code duplication when we use layer2-managed render passes, some minimal support (or "optional" activation of it) in layer1 could then be used by layer2 code. to bind the framebuffer too often, the resulting layer1 instructions somehow have to be batched. which was our long-term idea anyway. so we submit everything (and have it i memory, yes, maybe one chunk after the other?) and optimize and order it, then draw it to the framebuffer with minimal binding switches (also for textures, shaders, ...). nevertheless as a first step this is approach is good, and as we progress we'll see what we can keep as generalization in layer1 and what should move to layer2, then well converge to the best™ solution i hope :) |
Adds support for multi-mesh objects in the level 2 renderer as well as sorting by layers.
Terrain rendering
Layer support