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

Rework the post-processing model to reduce performance overhead #5861

Closed
darthLeviN opened this issue Nov 27, 2022 · 2 comments
Closed

Rework the post-processing model to reduce performance overhead #5861

darthLeviN opened this issue Nov 27, 2022 · 2 comments

Comments

@darthLeviN
Copy link

darthLeviN commented Nov 27, 2022

Describe the project you are working on

A Game that requires controlling how a group of objects are rendered. Post processing is also required.

Describe the problem or limitation you are having in your project

The current post processing method involves rending to a separate viewport. while that is the most flexible option, it also has the most overhead. a single empty full screen viewport in addition to the default one with nothing rendered could cut the fps in half.

Low end graphics don't have much power to make this overhead justified.

In most cases, the actual thing that's required is to render to the main buffer, not render to a separate buffer and then compose it with the main one.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

1- A new object type called ViewportHook to be made that connects to a already existing view port (with the option to connect to the main one) that has a option to either clear the previous depth buffer or not touch it at all.

2- Post processing shouldn't be done with a quad or on a CanvasItem level. that's just ugly. and might end up with some overhead as well.

Create a new shader type called "viewport shader" that has DEPTH and ALBEDO inouts along with some matrix built-ins.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

1- all viewports will have a post processing shader variable.
2- a new viewport type called ViewportHook that uses the existing buffer of another Viewport and allows clearing the depth buffer before it starts rending.

If this enhancement will not be used often, can it be worked around with a few lines of script?

nope, it's pretty hard to work around the overhead.

Is there a reason why this should be core and not an add-on in the asset library?

godot's post processing model at this point isn't a feature but rather a work around.

@Calinou Calinou changed the title Rework of post processing model Rework the post-processing model to reduce performance overhead Nov 28, 2022
@Calinou
Copy link
Member

Calinou commented Nov 28, 2022

Related to #495 and #496.

@clayjohn
Copy link
Member

This is a duplicate of #2196 So this would be better off as a comment on that thread instead of a thread of its own. That way we can track the discussion all in one place

@clayjohn clayjohn closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants