Unveränderter Ausgangsstand inklusive Masterprompt und Konzeptbildern unter assets/. .godot/ und docs/screenshots/ bleiben laut .gitignore unversioniert; letztere sind unter ../backups gesichert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
2.1 KiB
GDScript
50 lines
2.1 KiB
GDScript
extends RefCounted
|
|
## Shared cinematic lighting for game and inspection studio.
|
|
|
|
static func configure(environment: Environment, studio: bool = false) -> void:
|
|
environment.background_mode = Environment.BG_SKY
|
|
environment.ambient_light_source = Environment.AMBIENT_SOURCE_COLOR
|
|
environment.ambient_light_color = Color("a8b4c8")
|
|
environment.ambient_light_energy = .28 if studio else .34
|
|
environment.reflected_light_source = Environment.REFLECTION_SOURCE_SKY
|
|
var sky := Sky.new()
|
|
var material := ProceduralSkyMaterial.new()
|
|
material.sky_top_color = Color("2a3d58") if not studio else Color("1a2434")
|
|
material.sky_horizon_color = Color("e8c9a0") if not studio else Color("3a4a58")
|
|
material.ground_bottom_color = Color("1a1c24")
|
|
material.ground_horizon_color = Color("6a7a78")
|
|
material.sky_energy_multiplier = 1.05 if not studio else .7
|
|
material.ground_energy_multiplier = .4
|
|
material.sun_angle_max = 28.0
|
|
material.sun_curve = .12
|
|
sky.sky_material = material
|
|
environment.sky = sky
|
|
environment.tonemap_mode = Environment.TONE_MAPPER_ACES
|
|
environment.tonemap_exposure = 1.0
|
|
environment.tonemap_white = 4.0
|
|
environment.adjustment_enabled = true
|
|
environment.adjustment_brightness = 1.0
|
|
environment.adjustment_contrast = 1.06 if studio else 1.12
|
|
environment.adjustment_saturation = 1.05 if studio else 1.18
|
|
if not studio:
|
|
environment.fog_enabled = true
|
|
environment.fog_light_color = Color("7a9aaa")
|
|
environment.fog_density = .0022
|
|
environment.fog_sky_affect = .25
|
|
environment.volumetric_fog_enabled = false
|
|
if RenderingServer.get_current_rendering_method() == "forward_plus":
|
|
environment.ssao_enabled = true
|
|
environment.ssao_radius = 1.1
|
|
environment.ssao_intensity = 2.2
|
|
environment.ssao_power = 1.15
|
|
environment.ssao_detail = .4
|
|
environment.glow_enabled = true
|
|
environment.glow_intensity = .55
|
|
environment.glow_strength = .85
|
|
environment.glow_hdr_threshold = 1.2
|
|
environment.glow_bloom = .05
|
|
environment.glow_blend_mode = Environment.GLOW_BLEND_MODE_SCREEN
|
|
for i in range(1, 5):
|
|
environment.set_glow_level(i, .4 if i < 3 else .15)
|
|
environment.sdfgi_enabled = false
|
|
environment.ssr_enabled = false
|