ChromaticAberration

ChromaticAberration

  • color_lut : bevy_asset::handle::Handle<bevy_image::image::Image>
  • intensity : f32
  • max_samples : u32

Description

Adds colored fringes to the edges of objects in the scene.

Chromatic aberration simulates the effect when lenses fail to focus all colors of light toward a single point. It causes rainbow-colored streaks to appear, which are especially apparent on the edges of objects. Chromatic aberration is commonly used for collision effects, especially in horror games.

Bevy's implementation is based on that of Inside (Gjøl & Svendsen 2016). It's based on a customizable lookup texture, which allows for changing the color pattern. By default, the color pattern is simply a 3×1 pixel texture consisting of red, green, and blue, in that order, but you can change it to any image in order to achieve different effects.

Functions