bevy/crates/bevy_core_pipeline/src
Patrick Walton fcda67e894
Start a built-in postprocessing stack, and implement chromatic aberration in it. (#13695)
This commit creates a new built-in postprocessing shader that's designed
to hold miscellaneous postprocessing effects, and starts it off with
chromatic aberration. Possible future effects include vignette, film
grain, and lens distortion.

[Chromatic aberration] is a common postprocessing effect that simulates
lenses that fail to focus all colors of light to a single point. It's
often used for impact effects and/or horror games. This patch uses the
technique from *Inside* ([Gjøl & Svendsen 2016]), which allows the
developer to customize the particular color pattern to achieve different
effects. Unity HDRP uses the same technique, while Unreal has a
hard-wired fixed color pattern.

A new example, `post_processing`, has been added, in order to
demonstrate the technique. The existing `post_processing` shader has
been renamed to `custom_post_processing`, for clarity.

[Chromatic aberration]:
https://en.wikipedia.org/wiki/Chromatic_aberration

[Gjøl & Svendsen 2016]:
https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf

![Screenshot 2024-06-04
180304](https://github.com/bevyengine/bevy/assets/157897/3631c64f-a615-44fe-91ca-7f04df0a54b2)

![Screenshot 2024-06-04
180743](https://github.com/bevyengine/bevy/assets/157897/ee055cbf-4314-49c5-8bfa-8d8a17bd52bb)

## Changelog

### Added

* Chromatic aberration is now available as a built-in postprocessing
effect. To use it, add `ChromaticAberration` to your camera.
2024-07-15 13:59:02 +00:00
..
auto_exposure Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
blit Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bloom Fix a few "repeated word" typos (#13955) 2024-06-20 21:35:20 +00:00
contrast_adaptive_sharpening Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
core_2d Start a built-in postprocessing stack, and implement chromatic aberration in it. (#13695) 2024-07-15 13:59:02 +00:00
core_3d Start a built-in postprocessing stack, and implement chromatic aberration in it. (#13695) 2024-07-15 13:59:02 +00:00
deferred Allow phase items not associated with meshes to be binned. (#14029) 2024-06-27 16:13:03 +00:00
dof Implement opt-in sharp screen-space reflections for the deferred renderer, with improved raymarching code. (#13418) 2024-05-27 13:43:40 +00:00
fullscreen_vertex_shader Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
fxaa Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
motion_blur Fix: Motion blur should sample onscreen fragments with no depth (#13573) 2024-05-30 13:52:47 +00:00
post_process Start a built-in postprocessing stack, and implement chromatic aberration in it. (#13695) 2024-07-15 13:59:02 +00:00
prepass Allow phase items not associated with meshes to be binned. (#14029) 2024-06-27 16:13:03 +00:00
skybox Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
smaa Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
taa Implement motion vectors and TAA for skinned meshes and meshes with morph targets. (#13572) 2024-05-31 17:02:28 +00:00
tonemapping Skip tonemapping in case it is none (#13679) 2024-06-05 11:32:46 +00:00
upscaling Apply Clippy lints regarding lazy evaluation and closures (#14015) 2024-07-01 15:54:40 +00:00
lib.rs Start a built-in postprocessing stack, and implement chromatic aberration in it. (#13695) 2024-07-15 13:59:02 +00:00
msaa_writeback.rs Clean up 2d render phases (#12982) 2024-05-08 08:13:39 +00:00