Skybox is not tonemapped in the LDR path
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
Bevy main using default Bevy features.
## What you did
I rendered a `Skybox` with a non-HDR `Camera3d` and changed the camera `Tonemapping` method.
## What went wrong
I expected the skybox to be affected by the camera tonemapping, the same way PBR meshes in the LDR path. Instead, changing the `Tonemapping` component has no visible effect on the skybox when HDR is disabled.
When HDR is enabled, the skybox is affected by the regular post-process tonemapping pass. The issue is specific to the LDR path.
## Additional information
One possible shader-side fix would be to apply tonemapping in `skybox.wgsl`, similarly to the PBR path:
```wgsl
#ifdef TONEMAP_IN_SHADER
output_color = tone_mapping(output_color, view.color_grading);
#endif
```
However, this small WGSL change is not sufficient on its own, because the skybox pipeline does not currently define `TONEMAP_IN_SHADER`. So the apparent fix in `skybox.wgsl` is simple, but the actual fix requires a fair amount of plumbing in the skybox render pipeline.
Contributor guide
Assessment
This issue has not been assessed yet.