太阳光照

This commit is contained in:
2026-07-27 16:43:40 +08:00
parent b8f8080325
commit c04caf2f1f
3 changed files with 8 additions and 0 deletions
+4
View File
@@ -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});
+2
View File
@@ -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;