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
Render to a HDR framebuffer and tonemap to the device buffer #6
Conversation
Utgh, we can't actually do this in the case of bloom anwyay. |
I think this is the way to go, but I need to make some wgpu PRs first (for rendering to a float16 texture, multiview support etc.). |
Think we're gonna need to make a patch for naga that adds |
I'm happy with this! Need to test on android and have something working there and then we're good to merge. |
... So according to https://webglreport.com/?v=2,
but not on:
unbelievable. |
…ve a single view like AR mode on phones)
We want tonemapping to be able to handle HDR. We could do the tonemapping inline at the end of regular shaders, but this would mean that we couldn't do HDR post processing such as bloom, as well as other effects like accurate transmissive rendering.
This does cause some problems for AR, because by default we're blitting the entire HDR framebuffer to the output framebuffer, which writes over the camera image. I'm not sure if it's possible to copy the camera image to the HDR framebuffer first (need to check) but a better solution is to probably use stencil testing for this so we only blit pixels we've written to.