From b2d4de57ed7363fe30349ee443479ad4096ef048 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 3 Dec 2026 14:39:39 +0400 Subject: feat(render): omit terrain microtextures on low quality --- crates/fparkan-assets/src/game_settings.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'crates/fparkan-assets/src') diff --git a/crates/fparkan-assets/src/game_settings.rs b/crates/fparkan-assets/src/game_settings.rs index 4686ac71..5bcf7084 100644 --- a/crates/fparkan-assets/src/game_settings.rs +++ b/crates/fparkan-assets/src/game_settings.rs @@ -60,6 +60,11 @@ impl GameSettings { self.integer("RENDER_QUALITY") != Some(0) } + /// The lowest native render quality omits the two terrain microtexture stages. + pub fn terrain_microtexturing(&self) -> bool { + self.integer("RENDER_QUALITY") != Some(0) + } + /// Reads separate wave and CD volume settings from the original profile. pub fn audio(&self) -> AudioSettings { let gain = |key| { @@ -185,14 +190,16 @@ fn reads_water_reflections_independently_of_embm() { #[cfg(test)] #[test] -fn only_low_render_quality_omits_the_cloud_pass() { +fn only_low_render_quality_omits_clouds_and_terrain_microtextures() { for (profile, expected) in [ (&b"[CS]\nRENDER_QUALITY=0"[..], false), (&b"[CS]\nRENDER_QUALITY=1"[..], true), (&b"[CS]\nRENDER_QUALITY=2"[..], true), (&b"[CS]"[..], true), ] { - assert_eq!(GameSettings(Arc::from(profile)).sky_clouds(), expected); + let settings = GameSettings(Arc::from(profile)); + assert_eq!(settings.sky_clouds(), expected); + assert_eq!(settings.terrain_microtexturing(), expected); } } -- cgit v1.2.3