Repository navigation
Backlog
Description
Follow-ups from the review of #555 (PC shadows and lighting). The PR fixed the dark lamps on Quest and lower quality levels, the torch's leftover shadow after a world change, the moving-light cap (the torch now has priority, and the cap is logged) and the unused _MAIN_LIGHT_SHADOWS_SCREEN variants. These were left for later.
Quest / build
- Shader variant stripper (
IPreprocessShaders) for Android/Pico: strip the main/additional shadow, soft shadow and SSAO keywords from the Gothic shaders. The build contains all three URP assets, and HighFidelity has shadows, so URP keeps these variants for the Quest build too. Compare APK build time, size and variant count before and after. - Check the Quest look in the headset. Darker nights, mines and rain, stronger lamps and day dimming also apply on Quest, without shadows (kept on purpose, see the ADR). Fix it separately if it looks wrong.
- Per-pixel cost on Quest. World, plants and objects now compute
GothicSunAndAmbient/GothicClampLightper pixel; SingleMesh carries two extra interpolators. Do a GPU capture on Quest; maybe keep the old per-vertex path when no shadow keyword is set. - The sun is created in code on every platform, including Quest, where it becomes URP's main light. Skip or disable it when
supportsMainLightShadowsis false.
Structure
- Split the shadow logic out of
StationaryLightsService(1100+ lines, 7 responsibilities) into aStationaryLightShadowsDomain: UpdateShadowLights, RefreshShadowLights, Add/RemoveDynamicShadowLight, ApplyDynamicShadow, SetLightShadow, plus the shadow cache wiring from feat: every lamp and fire in reach casts a cached shadow (GD3D11-like) - no more light through walls #559. - The "Shadows" option mapping as an enum (off/hard/medium/soft ->
LightShadows+SoftShadowQuality). It is written inStationaryLightsService(2x) andSkyService. -
IsOutdoor/IsIndoor: two bools for one fact. -
_maxShadowLights(64) appears in bothGothicShadowLightsFeatureandGothicShadows.hlsl, and nothing checks that the two match.
Smaller
- SSAO is not tied to the "Shadows" option, so a weak PC can't turn it off.
-
RefreshShadowLightsreturns early without a main camera. -
UpdateRenderer: the sort lambda capturescenter(allocates for every renderer with >16 lights), and each change of the shadow set re-sorts all affected renderers. - The Dynamic shaders have no DepthOnly / DepthNormals pass, so NPCs and the hero get no SSAO.
-
GothicShadowLightsFeature: the catch-all swallows silently (log once);VisibleLightcopies for up to 256 lights per camera per frame. - Two stacked
<summary>blocks nearHasLightMappedCeiling; the slider reusesSmoothRotationSettingAmount; check the removedNpcHeadMeshBuilderwarning. - Wiki / Player guide: the new ini keys
shadows(default 3) andshadowRange(default 0.75).
Metadata
Metadata
Assignees
Labels
No labels
Activity