egui/crates/egui_glow/src
Jonas Wagner b283b8a560
Introduce dithering to reduce banding (#4497)
This PR introduces dithering in the egui_glow and egui_wgpu backends to
reduce banding artifacts.

It's based on the approach mentioned in #4493 with the small difference
that the amount of noise is scaled down slightly to avoid dithering
colors that can be represented exactly. This keeps flat surfaces clean.

Exaggerated dithering to show what is happening:
![Screenshot from 2024-05-14
19-09-48](https://github.com/emilk/egui/assets/293536/75782b83-9023-4cb2-99f7-a24e15fdefcc)

Subtle dithering as commited.
![Screenshot from 2024-05-14
19-13-40](https://github.com/emilk/egui/assets/293536/eb904698-a6ec-494a-952b-447e9a49bfda)

Closes #4493
2024-07-08 09:57:11 +02:00
..
shader Introduce dithering to reduce banding (#4497) 2024-07-08 09:57:11 +02:00
lib.rs Enable egui_glow's winit feature on wasm (#4420) (#4421) 2024-04-29 10:33:23 +02:00
misc_util.rs Update MSRV to Rust 1.72 (#3595) 2023-11-21 17:26:35 +01:00
painter.rs Introduce dithering to reduce banding (#4497) 2024-07-08 09:57:11 +02:00
shader_version.rs Replace cargo-cranky with workspace lints (#4413) 2024-04-25 17:24:50 +02:00
vao.rs Update MSRV to Rust 1.72 (#3595) 2023-11-21 17:26:35 +01:00
winit.rs Introduce dithering to reduce banding (#4497) 2024-07-08 09:57:11 +02:00