-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Add a separate ClearPass #3209
[Merged by Bors] - Add a separate ClearPass #3209
Conversation
The way this is implemented right now won't quite fix #3190 yet because |
Yes, I do occasionally lurk on the discord :D. Came across the thread after I had already done my initial changes. I feel like this would theoretically fix #3190, but I if there is more to it as was discussed in the thread, maybe it makes sense to have a complete solution from the beginning. |
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.
This looks good to me! It allows rendering of both 2d and 3d at the same time. I think in the future we might want to make the views configurable so you can specify which ones get cleared, but I don't think that's required yet. Can we get main merged in or this branch rebased to get rid of the merge conflicts?
Yeah I agree that ultimately we'll want "per view" clear behaviors / graphs, but those changes seem like they will go hand in hand with the addition of "multiple render targets". This implementation seems like a perfectly reasonable interim solution. |
I believe CI should be working now. Lets give it a go! |
bors r+ |
# Objective - Rendering before MainPass should be possible, so clearing needs to happen in an earlier pass. - Fixes #3190. ## Solution - I added a "Clear" SubGraph, a "ClearPassNode" Node, that clears the color and depth attachments of all views and a "ClearNodeDriver" Node, that schedules the "ClearPassNode" before MainPass. - Make sure that the 2d and 3d draw passes do not clear their attachments anymore. ### Notes - It works in the way, that with the current pipeline examples nothing should have changed in their behaviour - I would like to add an example that adds a pass inbetween ClearPass and MainPass, but I do not understand enough about the new render architecture to do that yet - Clears all attachment for all views: I do not know enough about rendering in general to say, whether there is a use case for not clearing - Does not solve #3043 as we still need Cameras/ViewTargets to clear.
# Objective - after #3209, 2d examples background were not cleared <img width="912" alt="Screenshot 2021-12-10 at 00 48 04" src="https://user-images.githubusercontent.com/8672791/145494415-d4b7a149-6f9a-4036-9ac5-3d1227b4de69.png"> ## Solution - Change the query to also work when there isn't a `ViewDepthTexture`
Objective
Solution
Notes