#pragma once #include "CoreMinimal.h" /** Constants of the look (Render/*; DESIGN_UE.md section 7, requirements V1, U6, U12). Lengths in metres unless the name says uu. */ namespace Descent::Tune::Look { // ---- surface light and fog density (sections 2.7, 7.1) ---- /** L(Z) = clamp(exp(-(SurfaceZ - Z) / SurfaceScaleM), 0, 1). */ constexpr double SurfaceZ = 40.0; constexpr double SurfaceScaleM = 68.0; /** rho = FogBase + FogLightGain * (1 - L). */ constexpr double FogBase = 0.015; constexpr double FogLightGain = 0.006; constexpr double FogHelmFactor = 0.3; // helm camera views 1-4 (v2) /** Absorption per colour channel: red dies first (section 7.2). */ constexpr double AbsorbR = 3.2, AbsorbG = 1.05, AbsorbB = 0.8; constexpr double FogPower = 1.35; constexpr double FarMetres = 1500.0; // sky pixels count as this far constexpr double WaterColorMinLight = 0.03; // water colour * (0.03 + 0.97 L) constexpr double SunGlowGain = 0.35; constexpr double SunGlowPower = 6.0; // Linear water colours (sRGB #2f8f9a, #06222a). constexpr float WaterTopR = 0.028f, WaterTopG = 0.275f, WaterTopB = 0.323f; constexpr float WaterDeepR = 0.0018f, WaterDeepG = 0.0159f, WaterDeepB = 0.0232f; constexpr float SunDirX = -0.12f, SunDirY = 0.20f, SunDirZ = 1.0f; // ---- ambient (section 7.3) ---- constexpr float AmbientSkyR = 0.35f, AmbientSkyG = 0.62f, AmbientSkyB = 0.66f; constexpr float AmbientGroundR = 0.03f, AmbientGroundG = 0.05f, AmbientGroundB = 0.06f; constexpr double AmbientBase = 0.015, AmbientLightGain = 1.25; constexpr float AmbientDryR = 0.95f, AmbientDryG = 0.90f, AmbientDryB = 0.82f; constexpr double AmbientDryLevel = 0.06; // ---- exponential height fog, volumetric only (section 7.2) ---- constexpr float VolFogDensity = 0.02f; constexpr float VolFogHeightFalloff = 0.001f; constexpr float VolFogExtinctionScale = 4.0f; constexpr float VolFogScatteringDistribution = 0.2f; constexpr float VolFogDistanceUU = 12000.f; constexpr float VolFogStartSwimUU = 50.f; constexpr float VolFogStartCockpitUU = 200.f; constexpr double VolFogBlendSec = 0.3; // switching it off in the dry (section 7.4) // ---- lights (section 7.5): bUseInverseSquaredFalloff = false, LightFalloffExponent 3 ---- constexpr float LightFalloffExponent = 3.f; constexpr double TenderLampRadiusM = 90.0, TenderLampInnerDeg = 14.5, TenderLampOuterDeg = 26.4, TenderLampIntensity = 3.2, TenderLampScatter = 1.0; constexpr double FlashlightRadiusM = 55.0, FlashlightInnerDeg = 12.0, FlashlightOuterDeg = 20.6, FlashlightIntensity = 2.0, FlashlightScatter = 0.8; constexpr double SunIntensityPerLight = 1.6; // surface sun = this * L constexpr double SunHiddenBelowL = 0.02; constexpr double SunVolScatter = 1.0; constexpr int32 LightPoolSize = 24; constexpr double LightPoolMaxScore = 9.0; // keep a request only if distance^2 / radius^2 - priority < this constexpr double LightPoolScatter = 0.3; // ---- post process (section 7.6) ---- constexpr float ExposureEvDefault = 0.3f; // cvar descent.Look.ExposureEV; chosen from look_sweep so the three wall bands are all mid-band constexpr float BloomIntensity = 0.15f; // x cvar descent.Look.Bloom (U12) constexpr float BloomThreshold = 1.2f; constexpr float BloomSizeScale = 2.0f; constexpr float VignetteIntensity = 0.45f; constexpr float FilmGrainIntensity = 0.15f; constexpr float SceneFringeIntensity = 0.2f; constexpr float AoIntensity = 0.5f; constexpr float AoRadiusUU = 60.f; // ---- marine snow (section 7.7) ---- constexpr int32 SnowInstances = 3200; constexpr int32 SnowInstancesLow = 1500; constexpr double SnowCubeM = 40.0; // ---- stencil value of the dry interior (sections 3.2, 7.4) ---- constexpr int32 DryStencilValue = 1; // ---- luminance bands the look scenarios check (section 7.10), sRGB-encoded luma 0..1 ---- constexpr double CalibWall10Lo = 0.38, CalibWall10Hi = 0.50; constexpr double CalibWall20Lo = 0.25, CalibWall20Hi = 0.40; constexpr double CalibWall40Lo = 0.06, CalibWall40Hi = 0.18; constexpr double DeepLampLo = 0.06, DeepLampHi = 0.35; constexpr double DeepDarkMax = 0.03; constexpr double NearWallMax = 0.55; constexpr double ThroatLo = 0.05, ThroatHi = 0.25; constexpr double BloomRingMaxFraction = 0.04, BloomOffRingMaxFraction = 0.01; }