Bloom doesn't render if other cameras don't have HDR
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version and features
- 0.17.3
- serialize
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
```ignore
` AdapterInfo { name: "NVIDIA GeForce RTX 2060", vendor: 4318, device: 7817, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "560.94", backend: Vulkan }`
```
## What you did
In my game i have 3 cameras, one is rendering the world, other is rendering the view model and an ui camera. I added bloom to world camera and world camera started not rendering anything.
## What went wrong
World camera stopped rendering after adding Bloom::NATURAL
## Additional information
My camera setup:
```rs
commands
.spawn((
Name::new("Player Camera"),
ViewVisibility::default(),
Visibility::default(),
MainCamera,
AccumalatedCameraInput::default(),
CameraRecoil::default(),
Transform::from_xyz(0.0, 0.0, 0.0),
))
.with_children(|parent| {
parent.spawn((
Camera3d::default(),
Camera {
order: 0,
clear_color: ClearColorConfig::Default,
..default()
},
RenderLayers::from_layers(&[LAYER_DEFAULT, LAYER_PARTICLES]),
WorldCamera::default(),
Bloom::NATURAL,
Tonemapping::TonyMcMapface,
Name::new("World Camera"),
));
parent.spawn((
Camera3d::default(),
Camera {
order: 1,
..default()
},
Projection::Perspective(PerspectiveProjection {
fov: 70.0_f32.to_radians(), // Wider FOV for viewmodel
..default()
}),
ViewModelCamera,
RenderLayers::from_layers(&[LAYER_VIEWMODEL, LAYER_PARTICLES]),
Name::new("ViewModel Camera"),
));
});
```
I fixed the issue adding Hdr::default( ) to other cameras, that fixed rendering problem but its unintuitive and not documented.
Contributor guide
Research direction
No source file or test is named. Start by reproducing the three-camera setup with Bloom::NATURAL on the world camera, then trace the Bloom and Hdr camera requirements. Done means the rendering behavior is corrected or the required Hdr setup is clearly documented, with coverage for cameras that do not use HDR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100