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

Do not clear when rendering to target in PostProcessEffect #8705

Merged
merged 5 commits into from Mar 27, 2024

Conversation

felixpalmer
Copy link
Collaborator

@felixpalmer felixpalmer commented Mar 25, 2024

For #8703

Background

Currently the PostProcessEffect clears the target it is drawing to. In order to implement per-layer postprocessing we need to disable this clearing

Change List

  • Add clear option to ScreenPass and set to false when rendering to target in PostProcessEffect

@coveralls
Copy link

coveralls commented Mar 25, 2024

Coverage Status

coverage: 89.976% (+0.001%) from 89.975%
when pulling 3384670 on felix/post-process-clear
into 51a3a3c on master.

Copy link
Collaborator

@Pessimistress Pessimistress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If deck is going to support per-view or per-layer effects, I don't think this option should be set by the user. Clearing of the target should be disabled in PostProcessEffect always, and handled in DeckRenderer instead.

@felixpalmer felixpalmer changed the title Support clearTarget option in PostProcessEffect Do not clear when rendering to target in PostProcessEffect Mar 26, 2024
@felixpalmer
Copy link
Collaborator Author

@Pessimistress I've removed the user visible option. From my testing it doesn't seem that we need the explicit clear in deck-renderer as the canvas is cleared on every frame automatically

@Pessimistress
Copy link
Collaborator

The canvas is auto cleared because preserveDrawingBuffer defaults to false. You should not rely on it, though.

@felixpalmer
Copy link
Collaborator Author

@Pessimistress updated to explicitly clear & tested with a canvas with preserveDrawingBuffer=true

@felixpalmer felixpalmer merged commit db26ab6 into master Mar 27, 2024
2 checks passed
@felixpalmer felixpalmer deleted the felix/post-process-clear branch March 27, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants