bevy/examples/2d
JMS55 2a7000a738 Revamp Bloom (#6677)
![image](https://user-images.githubusercontent.com/47158642/220197588-25e11022-02e4-45f3-b2e5-392c4ce7a025.png)

Huge credit to @StarLederer, who did almost all of the work on this. We're just reusing this PR to keep everything in one place.

# Objective

1. Make bloom more physically based.
1. Improve artistic control.
1. Allow to use bloom as screen blur.
1. Fix #6634.
1. Address #6655 (although the author makes incorrect conclusions).

## Solution

1. Set the default threshold to 0.
2. Lerp between bloom textures when `composite_mode: BloomCompositeMode::EnergyConserving`.
1. Use [a parametric function](https://starlederer.github.io/bloom) to control blend levels for each bloom texture. In the future this can be controlled per-pixel for things like lens dirt.
3. Implement BloomCompositeMode::Additive` for situations where the old school look is desired.

## Changelog

* Bloom now looks different.
* Added `BloomSettings:lf_boost`, `BloomSettings:lf_boost_curvature`, `BloomSettings::high_pass_frequency` and `BloomSettings::composite_mode`.
* `BloomSettings::scale` removed.
* `BloomSettings::knee` renamed to `BloomPrefilterSettings::softness`.
* `BloomSettings::threshold` renamed to `BloomPrefilterSettings::threshold`.
* The bloom example has been renamed to bloom_3d and improved. A bloom_2d example was added.

## Migration Guide

* Refactor mentions of `BloomSettings::knee` and `BloomSettings::threshold` as `BloomSettings::prefilter_settings` where knee is now `softness`.
* If defined without `..default()` add `..default()` to definitions of `BloomSettings` instances or manually define missing fields.
* Adapt to Bloom looking visually different (if needed).

Co-authored-by: Herman Lederer <germans.lederers@gmail.com>
2023-03-04 12:05:26 +00:00
..
2d_shapes.rs Add quad to 2d_shapes example (#7708) 2023-02-17 01:50:20 +00:00
bloom_2d.rs Revamp Bloom (#6677) 2023-03-04 12:05:26 +00:00
mesh2d.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
mesh2d_manual.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
mesh2d_vertex_color_texture.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
move_sprite.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
pixel_perfect.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
rotation.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
sprite.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
sprite_flipping.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
sprite_sheet.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
text2d.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
texture_atlas.rs Support system.in_schedule() and system.on_startup() (#7790) 2023-02-24 18:33:55 +00:00
transparency_2d.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00