bevy/assets/shaders
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.wgsl Split mesh shader files (#4867) 2022-05-31 23:23:25 +00:00
custom_material_chromatic_aberration.wgsl add a post-processing example (#4797) 2022-06-06 00:06:49 +00:00
custom_material_screenspace_texture.wgsl Split mesh shader files (#4867) 2022-05-31 23:23:25 +00:00
custom_material.frag add some more pipelined-rendering shader examples (#3041) 2022-01-05 19:43:11 +00:00
custom_material.vert Fixing confusing near and far fields in Camera (#4457) 2022-05-16 16:37:33 +00:00
custom_material.wgsl Update wgpu to 0.12 and naga to 0.8 (#3375) 2021-12-19 03:03:06 +00:00
custom_vertex_attribute.wgsl Split mesh shader files (#4867) 2022-05-31 23:23:25 +00:00
game_of_life.wgsl add some more pipelined-rendering shader examples (#3041) 2022-01-05 19:43:11 +00:00
instancing.wgsl Split mesh shader files (#4867) 2022-05-31 23:23:25 +00:00
shader_defs.wgsl Split mesh shader files (#4867) 2022-05-31 23:23:25 +00:00