bevy/examples/3d
Elabajaba 09f1bd0be7
Add port of AMD's Robust Contrast Adaptive Sharpening (#7422)
# Objective

TAA, FXAA, and some other post processing effects can cause the image to
become blurry. Sharpening helps to counteract that.

## Solution

~~This is a port of AMD's Contrast Adaptive Sharpening (I ported it from
the
[SweetFX](https://github.com/CeeJayDK/SweetFX/blob/master/Shaders/CAS.fx)
version, which is still MIT licensed). CAS is a good sharpening
algorithm that is better at avoiding the full screen oversharpening
artifacts that simpler algorithms tend to create.~~

This is a port of AMD's Robust Contrast Adaptive Sharpening (RCAS) which
they developed for FSR 1 ([and continue to use in FSR
2](149cf26e12/src/ffx-fsr2-api/shaders/ffx_fsr1.h (L599))).
RCAS is a good sharpening algorithm that is better at avoiding the full
screen oversharpening artifacts that simpler algorithms tend to create.

---

## Future Work

- Consider porting this to a compute shader for potentially better
performance. (In my testing it is currently ridiculously cheap (0.01ms
in Bistro at 1440p where I'm GPU bound), so this wasn't a priority,
especially since it would increase complexity due to still needing the
non-compute version for webgl2 support).

---

## Changelog

- Added Contrast Adaptive Sharpening.

---------

Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2023-04-02 20:14:01 +00:00
..
3d_gizmos.rs Immediate Mode Line/Gizmo Drawing (#6529) 2023-03-20 20:57:54 +00:00
3d_scene.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
3d_shapes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
anti_aliasing.rs Add port of AMD's Robust Contrast Adaptive Sharpening (#7422) 2023-04-02 20:14:01 +00:00
atmospheric_fog.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
blend_modes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
bloom_3d.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
fog.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
lighting.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
lines.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
load_gltf.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
orthographic.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
parenting.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
pbr.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
render_to_texture.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
shadow_biases.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
shadow_caster_receiver.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
skybox.rs Built-in skybox (#8275) 2023-04-02 10:57:12 +00:00
spherical_area_lights.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
split_screen.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
spotlight.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
texture.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
tonemapping.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
transparency_3d.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
two_passes.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
update_gltf_scene.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
vertex_colors.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
wireframe.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00