bevy_post_process 0.19.0-rc.1

Provides post process effects for Bevy Engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Miscellaneous postprocessing effects, currently just chromatic aberration.

#import bevy_core_pipeline::fullscreen_vertex_shader::FullscreenVertexOutput
#import bevy_post_process::effect_stack::chromatic_aberration::chromatic_aberration
#import bevy_post_process::effect_stack::lens_distortion::lens_distortion
#import bevy_post_process::effect_stack::vignette::vignette

@fragment
fn fragment_main(in: FullscreenVertexOutput) -> @location(0) vec4<f32> {
    let distorted_uv = lens_distortion(in.uv);
    let color = chromatic_aberration(distorted_uv);
    return vec4(vignette(in.uv, color), 1.0);
}