bevy/examples/3d
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
..
3d_scene.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
3d_shapes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
atmospheric_fog.rs Better cascades config defaults + builder, tweak example configs (#7456) 2023-02-05 08:06:32 +00:00
blend_modes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
bloom_3d.rs Revamp Bloom (#6677) 2023-03-04 12:05:26 +00:00
fog.rs Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
fxaa.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
lighting.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
lines.rs Allow passing glam vector types as vertex attributes (#6442) 2022-11-04 03:45:17 +00:00
load_gltf.rs Make ktx2 and zstd default features (#7696) 2023-02-17 01:00:07 +00:00
msaa.rs Include 2x/8x sample counts for Msaa (#7684) 2023-02-17 06:04:01 +00:00
orthographic.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
parenting.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
pbr.rs EnvironmentMapLight, BRDF Improvements (#7051) 2023-02-09 16:46:32 +00:00
render_to_texture.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
shadow_biases.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
shadow_caster_receiver.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
skybox.rs Make AsBindGroup unsized (#6937) 2022-12-16 01:40:15 +00:00
spherical_area_lights.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
split_screen.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
spotlight.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
texture.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
tonemapping.rs Initial tonemapping options (#7594) 2023-02-19 20:38:13 +00:00
transparency_3d.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
two_passes.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
update_gltf_scene.rs Base Sets (#7466) 2023-02-06 03:10:08 +00:00
vertex_colors.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00
wireframe.rs added subdivisions to shape::Plane (#7546) 2023-02-13 18:20:20 +00:00