Skip to content
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

Formalize internal rendering interface #753

Open
w23 opened this issue Dec 19, 2024 · 0 comments
Open

Formalize internal rendering interface #753

w23 opened this issue Dec 19, 2024 · 0 comments
Labels
dev-tools Tools helpful for development enhancement New feature or request

Comments

@w23
Copy link
Owner

w23 commented Dec 19, 2024

Currently there's vk_render.c which is kind of both collecting/passing though models for rendering, and doing the traditional rendering.
There's vk_rtx.c which is ray tracing rendering main core.
There's also vk_framectl.c which is being painfully aware of which renderer we're using.

This state of affairs doesn't bring joy.

What we could do instead is:

  1. Split vk_render.c into:
    • "proxy", which collects model rendering requests in sequence (they are ordered by the engine/scene)
    • traditional renderer, which performs the rendering of a given sequence
  2. Devise a Performer API, which suits both traditional and ray tracing renderer
  3. Make both trad and rt renderer modules implementing this API.
  4. Make framectl unaware of specific renderer. It should just pick the right performer from a list based on cvar. Or, maybe, the proxy could do that?
    • The only nasty quirk here is render-pass opening before or after the renderer: RT does not need renderpass for itself, but 2D overlay draws onto the RT result. Trad does use the renderpass fully. Maybe the renderer could have both function for before and after renderpass?

Ultimately, if meatpipe could be expanded enough, even trad renderer could be backed by just a meatpipe configuration, and we could have arbitrary renderers, pluggable, reloadable, and hot-swappable in realtime.

@w23 w23 added enhancement New feature or request dev-tools Tools helpful for development labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools Tools helpful for development enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant