From c04caf2f1f57817c73e5997c772e3610be24c3f7 Mon Sep 17 00:00:00 2001 From: wyc <1104749580@qq.com> Date: Mon, 27 Jul 2026 16:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E9=98=B3=E5=85=89=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.json | 2 ++ module/Local_Server/server/Config.cpp | 4 ++++ module/Local_Server/server/Config.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/config/config.json b/config/config.json index 74ad9c2..d805549 100644 --- a/config/config.json +++ b/config/config.json @@ -595,6 +595,8 @@ "fxaa": false, "shadows": false, "enable_lighting": false, + "solar_lighting": false, + "solar_light_intensity": 1.500000, "maximum_screen_space_error": 4, "terrain_enabled_in_3d": true, "terrain_exaggeration": 5.000000, diff --git a/module/Local_Server/server/Config.cpp b/module/Local_Server/server/Config.cpp index 8b0f5d9..97f3e1d 100644 --- a/module/Local_Server/server/Config.cpp +++ b/module/Local_Server/server/Config.cpp @@ -360,6 +360,8 @@ void Cesium_Graphics_Config::from_base_json(const Psc::JSON* that_json) { fxaa = read_optional_bool_field(that_json, "fxaa", fxaa); shadows = read_optional_bool_field(that_json, "shadows", shadows); enable_lighting = read_optional_bool_field(that_json, "enable_lighting", enable_lighting); + solar_lighting = read_optional_bool_field(that_json, "solar_lighting", solar_lighting); + solar_light_intensity = read_optional_double_field(that_json, "solar_light_intensity", solar_light_intensity); maximum_screen_space_error = std::clamp(read_optional_uint32_field(that_json, "maximum_screen_space_error", maximum_screen_space_error), 1u, 16u); terrain_enabled_in_3d = read_optional_bool_field(that_json, "terrain_enabled_in_3d", terrain_enabled_in_3d); terrain_exaggeration = read_optional_double_field(that_json, "terrain_exaggeration", terrain_exaggeration); @@ -377,6 +379,8 @@ Psc::JSON Cesium_Graphics_Config::to_base_json() const { ret.append({"fxaa", fxaa}); ret.append({"shadows", shadows}); ret.append({"enable_lighting", enable_lighting}); + ret.append({"solar_lighting", solar_lighting}); + ret.append({"solar_light_intensity", solar_light_intensity}); ret.append({"maximum_screen_space_error", maximum_screen_space_error}); ret.append({"terrain_enabled_in_3d", terrain_enabled_in_3d}); ret.append({"terrain_exaggeration", terrain_exaggeration}); diff --git a/module/Local_Server/server/Config.h b/module/Local_Server/server/Config.h index 476f542..43e69c2 100644 --- a/module/Local_Server/server/Config.h +++ b/module/Local_Server/server/Config.h @@ -179,6 +179,8 @@ struct Cesium_Graphics_Config { bool fxaa = false; bool shadows = false; bool enable_lighting = false; + bool solar_lighting = false; + double solar_light_intensity = 1.5; std::uint32_t maximum_screen_space_error = 4; bool terrain_enabled_in_3d = false; double terrain_exaggeration = 1.0;