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

Create modern looking bloom post-effect #5187

Closed
mvaligursky opened this issue Mar 24, 2023 · 11 comments · Fixed by #5833
Closed

Create modern looking bloom post-effect #5187

mvaligursky opened this issue Mar 24, 2023 · 11 comments · Fixed by #5833
Assignees
Labels
area: graphics Graphics related issue feature
Milestone

Comments

@mvaligursky
Copy link
Contributor

Currently, the engine only has a simple bloom effect, and a modern implementation is needed.

references:
https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom
https://www.froyok.fr/blog/2021-09-ue4-custom-lens-flare/
https://twitter.com/iced_coffee_dev/status/1617580408576565251?t=OYAlQMbMAx4PYCKlx7HplQ&s=03

@SashaRX
Copy link

SashaRX commented Mar 27, 2023

I experimented with it on this tutorial https://playcanv.as/b/491d8a85

@willeastcott
Copy link
Contributor

That looks cool, @SashaRX. Did you experience any problems or limitations using the technique from that article?

@SashaRX
Copy link

SashaRX commented Mar 28, 2023

That looks cool, @SashaRX. Did you experience any problems or limitations using the technique from that article?

In general, everything went really fast, despite my poor programming skills). I still haven't worked out how to use blendState and pc.drawQuadWithShader. Here it uses render to hdr render target, I use linear space, it's possible that this is not correct everywhere, since I didn't specify that albedo should be srgb for example, but it seems to be correct.

@MAG-AdrianMeredith
Copy link
Contributor

MAG-AdrianMeredith commented Mar 30, 2023

Looks good I'll be interested to see how that compares to our version. I made a custom enhancement to playcanvas hdr mode so that it renders to 11bits not 16bit. This was a lot faster to render on my m1 macbook (3-4ms). The one issue still remaining is alpha blended objects look different like they are being double tonemapped or something....

p.s. I mostly followed this one https://www.youtube.com/watch?v=tI70-HIc5ro
image

@mvaligursky
Copy link
Contributor Author

mvaligursky commented Mar 30, 2023

I'm definitely keen to have this working on 11bits as well, to have a wider device support as well. Part of the reason is that WebGPU does not currently handle float texture linear sampling .. and so that's a good way to get it to run there too.

Both results look fantastic.

@GSterbrant
Copy link
Contributor

I am also adding this link to the UE current bloom method for visibility: https://www.froyok.fr/blog/2021-12-ue4-custom-bloom/

@mvaligursky
Copy link
Contributor Author

Another awesome work on this:
https://forum.playcanvas.com/t/physically-based-hdr-bloom/31759

@mvaligursky
Copy link
Contributor Author

@GSterbrant - you did some work on this as well, could you please create a PR for this (just attach the file in current state), link the PR here and close the PR (for now), just to keep reference to that file.

@mvaligursky
Copy link
Contributor Author

@mvaligursky mvaligursky self-assigned this Jul 18, 2023
@MAG-AdrianMeredith
Copy link
Contributor

I like that custom ue4 one. I believe I can share the source to my implementation if you're interested though its still not 100% imo

@mvaligursky
Copy link
Contributor Author

Ideally we'd implement in using this system when ready: #5687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
Development

Successfully merging a pull request may close this issue.

5 participants