core: add film-grain overlay for materials

This commit is contained in:
2026-11-14 14:13:02 +07:00
parent db41b19e4a
commit 19154527f2
9 changed files with 145 additions and 2 deletions
+3 -1
View File
@@ -105,11 +105,13 @@ pub const PIXEL_AVATAR_LIGHT_CAP: f32 = 0.95;
pub const PIXEL_AVATAR_DARK_FACTOR: f32 = 0.45;
pub const PIXEL_AVATAR_DARK_FLOOR: f32 = 0.18;
/// The default window material transparency, as a percent (0 opaque, 100 the lightest fill).
pub const DEFAULT_TRANSPARENCY: u8 = 94;
pub const DEFAULT_TRANSPARENCY: u8 = 80;
/// The light-mode floor of the material fill.
pub const MIN_MATERIAL_FILL_LIGHT: f32 = 0.45;
/// The dark-mode floor of the material fill.
pub const MIN_MATERIAL_FILL_DARK: f32 = 0.15;
/// The opacity of the grain overlay's noise.
pub const GRAIN_ALPHA: f32 = 0.08;
/// Light or dark, resolved from the system appearance.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Deserialize)]