bevy/examples/shader
Thierry Berger 765bd46c2e add a post-processing example (#4797)
# Objective

- Add an example showing a custom post processing effect, done after the first rendering pass.

## Solution

- A simple post processing "chromatic aberration" effect. I mixed together examples `3d/render_to_texture`, and `shader/shader_material_screenspace_texture`
- Reading a bit how https://github.com/bevyengine/bevy/pull/3430 was done gave me pointers to apply the main pass to the 2d render rather than using a 3d quad.

This work might be or not be relevant to https://github.com/bevyengine/bevy/issues/2724

<details>

<summary> ⚠️ Click for a video of the render ⚠️ I’ve been told it might hurt the eyes 👀 , maybe we should choose another effect just in case ?</summary>

https://user-images.githubusercontent.com/2290685/169138830-a6dc8a9f-8798-44b9-8d9e-449e60614916.mp4

</details>

# Request for feedbacks

- [ ] Is chromatic aberration effect ok ? (Correct term, not a danger for the eyes ?) I'm open to suggestion to make something different.
- [ ] Is the code idiomatic ? I preferred a "main camera -> **new camera with post processing applied to a quad**" approach to emulate minimum modification to existing code wanting to add global post processing.

---

## Changelog

- Add a full screen post processing shader example
2022-06-06 00:06:49 +00:00
..
animate_shader.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
compute_shader_game_of_life.rs Update commented vsync code in example to use present_mode (#4926) 2022-06-04 20:00:01 +00:00
custom_vertex_attribute.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
post_processing.rs add a post-processing example (#4797) 2022-06-06 00:06:49 +00:00
shader_defs.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
shader_instancing.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
shader_material.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
shader_material_glsl.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00
shader_material_screenspace_texture.rs Camera Driven Rendering (#4745) 2022-06-02 00:12:17 +00:00