@tool class_name PostProcessProfile extends Resource @export_group("Sky Gradient") @export var gradient_enabled: bool = true @export var gradient_intensity: float = 1.0 @export var gradient_curve: Curve @export_group("Fog Shaping") @export var fog_enabled: bool = true @export var height_fog_enabled: bool = true @export var height_fog_start: float = 0.0 @export var height_fog_end: float = 100.0 @export var height_fog_curve: float = 1.0 @export var distance_fog_enabled: bool = true @export var distance_fog_start: float = 50.0 @export var distance_fog_end: float = 500.0 @export_group("Sun Glow") @export var sun_glow_enabled: bool = true @export var sun_glow_intensity: float = 0.5 @export var sun_glow_size: float = 0.2 @export var sun_glow_falloff: float = 2.0 @export var sun_glow_color: Color = Color(1.0, 0.95, 0.8) @export_group("Dawn/Dusk Enhancement") @export var dawn_dusk_enabled: bool = true @export var dawn_dusk_intensity: float = 0.5 @export var dawn_dusk_color: Color = Color(1.0, 0.6, 0.4) @export var dawn_dusk_blend_range: float = 0.15 func lerp_to(other: PostProcessProfile, weight: float) -> PostProcessProfile: var result := PostProcessProfile.new() result.gradient_enabled = gradient_enabled if weight < 0.5 else other.gradient_enabled result.gradient_intensity = lerpf(gradient_intensity, other.gradient_intensity, weight) result.fog_enabled = fog_enabled if weight < 0.5 else other.fog_enabled result.height_fog_enabled = height_fog_enabled if weight < 0.5 else other.height_fog_enabled result.height_fog_start = lerpf(height_fog_start, other.height_fog_start, weight) result.height_fog_end = lerpf(height_fog_end, other.height_fog_end, weight) result.height_fog_curve = lerpf(height_fog_curve, other.height_fog_curve, weight) result.distance_fog_enabled = distance_fog_enabled if weight < 0.5 else other.distance_fog_enabled result.distance_fog_start = lerpf(distance_fog_start, other.distance_fog_start, weight) result.distance_fog_end = lerpf(distance_fog_end, other.distance_fog_end, weight) result.sun_glow_enabled = sun_glow_enabled if weight < 0.5 else other.sun_glow_enabled result.sun_glow_intensity = lerpf(sun_glow_intensity, other.sun_glow_intensity, weight) result.sun_glow_size = lerpf(sun_glow_size, other.sun_glow_size, weight) result.sun_glow_falloff = lerpf(sun_glow_falloff, other.sun_glow_falloff, weight) result.sun_glow_color = sun_glow_color.lerp(other.sun_glow_color, weight) result.dawn_dusk_enabled = dawn_dusk_enabled if weight < 0.5 else other.dawn_dusk_enabled result.dawn_dusk_intensity = lerpf(dawn_dusk_intensity, other.dawn_dusk_intensity, weight) result.dawn_dusk_color = dawn_dusk_color.lerp(other.dawn_dusk_color, weight) result.dawn_dusk_blend_range = lerpf(dawn_dusk_blend_range, other.dawn_dusk_blend_range, weight) return result