mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-25 18:05:12 -04:00
3ad83c910b
For title-specific lighting presets ([video] post_shader):
- `input <sampler> depth`: view depth sz (GTE screen z) of the presented frame,
R32F at window size, rebuilt from the surfaces' PGXP depth; 0 where nothing
3D drew. Only built while a loaded chain reads it.
- `input <sampler> history`: the pass's own target from the last real frame
(trails, temporal filters); generated frames do not update it.
- `u_time` (seconds since the chain loaded) and `u_proj` (latest GTE
projection: 240/H, screen centre in uv, aspect) in every pass.
- Live uniforms: psx_host_set_post_uniform(name, x, y, z, w) sets a preset
`uniform` from game state (e.g. a light source projected to the screen);
the preset value applies until the first call.
- Debug: TCP {"cmd":"post_shader"} reports the loaded preset, its parse status
and the live values; {"cmd":"post_shader","path":"..."} reloads a preset
(or loads another) without restarting, for shader work.
docs/POST_EFFECTS.md documents the inputs and the uniforms.
Used by a lighting preset for R4 (sun and tunnel light shafts, lamp halos,
speed streaks, paint reflections on the player's car from live car pose),
about 0.7 ms of GPU at 1080p on an RTX 3060.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6