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

Implement HDR rendering + postprocessing pipeline #4323

Open
mvaligursky opened this issue Jun 10, 2022 · 7 comments
Open

Implement HDR rendering + postprocessing pipeline #4323

mvaligursky opened this issue Jun 10, 2022 · 7 comments
Labels
area: graphics Graphics related issue feature request

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Jun 10, 2022

PlayCanvas by default renders everything in LDR to 8888 targets. Lighting in the shader takes place in linear HDR space, and at the end of the standard shader we apply tone-mapping to bring it to LDR range, and then apply gamma. Post-processing then takes place on top of that, usually directly in the gamma space.

I tried to enable HDR rendering and a bloom filter. The scene rendering takes place in linear HDR as before, and this is directly stored in 16F target in linear space. Great so far.
Then the bloom runs, again in linear space, but internally it uses 8888 targets for blurs, so the HDR is lost. And also, we’re missing a way to apply tone mapping at the end / or somewhere in the post-processing, and also at the end a linear space image is generated, which is very contrasty - we need to bring it to gamma space.

Additionally the bloom does not look very good .. possibly related to the fact it uses LDR targets, but could be something else as well.

exploration PR: #4322

@slimbuck
Copy link
Member

I wonder how well rgbm 8888 targets would work... Rgbm should be blurrable etc without having to decode/encode, but not sure what artifacts might result.

@mvaligursky
Copy link
Contributor Author

Yep, many implementations use RGBM and it's a viable / faster option, with some range limitations.

@mvaligursky
Copy link
Contributor Author

@mvaligursky
Copy link
Contributor Author

related #5287

@mvaligursky
Copy link
Contributor Author

related #4284

@mvaligursky
Copy link
Contributor Author

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

@mvaligursky
Copy link
Contributor Author

related: #5833

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 request
Projects
None yet
Development

No branches or pull requests

2 participants