Files
totk-pc-recomp/runtime/shaders
581c1ecdef Darken only sunlit pixels with contact shadows
The half-resolution lighting pass the composite reads keeps the sun's visibility in its first target's alpha: 1 in
the sun, 0 in the shadow maps' shadow and everywhere underground. vk_contact.c finds that pass (eight targets at half
the scene size, the first RGBA8) and contact_shadow.comp scales its darkening by that alpha, so a contact shadow takes
away direct sunlight only and caves no longer turn flat. Without that pass in the frame the old behaviour stays.
TOTK_CONTACT_DEBUG=2 shows the visibility in grey.

Carried onto dev from #439: the march is now planned by the scan (vk_contact_plan) and recorded from a VkExecJob, so
the lighting target travels in the job's new sun field, and the factor multiplies the facing-the-sun factor of the
back-face fix.

Co-Authored-By: itaskaev2 <165683571+itaskaev2@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:34:42 +01:00
..
2026-10-31 21:17:12 +01:00
2026-10-31 21:17:12 +01:00
2026-10-31 21:17:12 +01:00