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

Update to render passes - generate scene half sized texture #7175

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Dec 6, 2024

Before: The scene gets rendered to a render target. The bloom then blurs it by downscaling and upscaling, starting at half size. The first bloom pass would just cheaply (box filter) downscale to half size. That makes the final bloom texture half size of the scene.

Now: The cheap downscale to half res is pulled out of bloom, as that is something other effects (DOF) needs as well, so lets generate it only one time. Bloom then uses it.

Small change is that the bloom texture ends up being a quarter size and not half size, so slightly cheaper, but I cannot see any difference visually, so happy with this.

Co-authored-by: Will Eastcott <will@playcanvas.com>
@mvaligursky mvaligursky merged commit 858c5e5 into main Dec 6, 2024
8 checks passed
@mvaligursky mvaligursky deleted the mv-render-pass-scene-half branch December 6, 2024 12:41
slimbuck pushed a commit that referenced this pull request Dec 9, 2024
* Update to render passes - generate scene half sized texture

* Update src/platform/graphics/render-target.js

Co-authored-by: Will Eastcott <will@playcanvas.com>

---------

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
Co-authored-by: Will Eastcott <will@playcanvas.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants