bevy/assets
Marco Buono 1a96d820fd Add Distance and Atmospheric Fog support (#6412)
<img width="1392" alt="image" src="https://user-images.githubusercontent.com/418473/203873533-44c029af-13b7-4740-8ea3-af96bd5867c9.png">
<img width="1392" alt="image" src="https://user-images.githubusercontent.com/418473/203873549-36be7a23-b341-42a2-8a9f-ceea8ac7a2b8.png">


# Objective

- Add support for the “classic” distance fog effect, as well as a more advanced atmospheric fog effect.

## Solution

This PR:

- Introduces a new `FogSettings` component that controls distance fog per-camera. 
- Adds support for three widely used “traditional” fog falloff modes: `Linear`, `Exponential` and `ExponentialSquared`, as well as a more advanced `Atmospheric` fog;
- Adds support for directional light influence over fog color;
- Extracts fog via `ExtractComponent`, then uses a prepare system that sets up a new dynamic uniform struct (`Fog`), similar to other mesh view types;
- Renders fog in PBR material shader, as a final adjustment to the `output_color`, after PBR is computed (but before tone mapping);
- Adds a new `StandardMaterial` flag to enable fog; (`fog_enabled`)
- Adds convenience methods for easier artistic control when creating non-linear fog types;
- Adds documentation around fog.

---

## Changelog

### Added

- Added support for distance-based fog effects for PBR materials, controllable per-camera via the new `FogSettings` component;
- Added `FogFalloff` enum for selecting between three widely used “traditional” fog falloff modes: `Linear`, `Exponential` and `ExponentialSquared`, as well as a more advanced `Atmospheric` fog;
2023-01-29 15:28:56 +00:00
..
android-res/mipmap-mdpi android example polish (#845) 2020-11-11 16:31:16 -08:00
branding Minor Dark/Light Logo Tweak (#4051) 2022-02-27 02:09:42 +00:00
data Asset system rework and GLTF scene loading (#693) 2020-10-18 13:48:15 -07:00
fonts Add the license for the FiraMono font (#3589) 2022-05-06 19:29:43 +00:00
models Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
pixel Add pixelated Bevy to assets and an example (#6408) 2022-11-14 22:15:46 +00:00
scenes bevy_scene: Serialize entities to map (#6416) 2022-10-31 16:35:18 +00:00
shaders Use only one sampler in the array texture example. (#7405) 2023-01-29 15:08:21 +00:00
sounds Add simple collision sound to breakout (#4331) 2022-04-14 20:20:38 +00:00
textures Support array / cubemap / cubemap array textures in KTX2 (#5325) 2022-07-30 07:02:58 +00:00