-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Mix of HDR and non-HDR cameras breaks rendering #6754
Comments
There are two problems:
If I instead unconditionally load the colour attachment texture, and alpha blend it, then the desired result is produced. I think the following should be done as a proper solution:
|
#10325 should let us implement a proper fix for this now |
We don't need |
Also happening on 0.13.1. Here's a minimal example that replicates it. Tested on M1: |
I'd like to tackle this tomorrow if no one is already working on it. |
No one else is working on it, feel free to. |
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes bevyengine#6754
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes #6754 ## Testing Tested against provided test case in issue: ![image](https://github.com/bevyengine/bevy/assets/10366310/d066f069-87fb-4249-a4d9-b6cb1751971b) --- ## Changelog - Allow cameras rendering to the same output texture with mixed hdr to work correctly. ## Migration Guide - - Change `CameraOutputMode` to use `ClearColorConfig` instead of `LoadOp`.
Changes: - Track whether an output texture has been written to yet and only clear it on the first write. - Use `ClearColorConfig` on `CameraOutputMode` instead of a raw `LoadOp`. - Track whether a output texture has been seen when specializing the upscaling pipeline and use alpha blending for extra cameras rendering to that texture that do not specify an explicit blend mode. Fixes #6754 ## Testing Tested against provided test case in issue: ![image](https://github.com/bevyengine/bevy/assets/10366310/d066f069-87fb-4249-a4d9-b6cb1751971b) --- ## Changelog - Allow cameras rendering to the same output texture with mixed hdr to work correctly. ## Migration Guide - - Change `CameraOutputMode` to use `ClearColorConfig` instead of `LoadOp`.
Bevy version
0.9 and main
Relevant system information
What you did
Change the
split_screen.rs
example to addhdr: true
on one camera but not the other (doesn't matter which one).What went wrong
Background becomes black, default clear color (grey) not applied anymore. I both cases (whether hdr is set on left or right), only the right camera shows something.
Testing this on another 4-camera 🎆 Hanabi example, where things animate, I can confirm clearing doesn't work (all particles render on the previous frame) and the HDR camera stops rendering:
Although the latter could be a bug in 🎆 Hanabi, the similarity of artifacts might help diagnosing the issue.
Additional information
I'm guessing the cameras have incompatible render target, and there's no "smart" resolution applying tonemapping only to HDR ones.
It's unclear if this is supposed to work in the first place but logged as bug because @superdump said it should "maybe" be supported.
The text was updated successfully, but these errors were encountered: