feat(render3d): DLSS super resolution and Reflex through NVIDIA Streamline

streamline.ludic: slInit before the Vulkan instance, feature support per
adapter, a frame token per frame, Reflex sleep and PCL latency markers, and
DLSS super resolution on the lit HDR frame (Halton jitter, depth + zero
motion vectors with camera motion from clipToPrevClip, matrices carrying
the Vulkan path's y flip and depth remap). Bloom, tonemap and sharpen read
the upscaled size. The device asks for privateData and present_id, which
Streamline's hooks need. R3D_DLSS / R3D_REFLEX / R3D_SL_LOG for tests.
gpu_feature_implemented: DLSS and Reflex.

ludic bundle (Windows): app native "<dir>" copies native libraries beside
the executable.

Verified on an RTX 3070 Ti: DLSS Quality evaluates 1280x720 -> 1920x1080.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-15 19:26:12 +03:00
parent ad8f44b78a
commit ac539b0150
10 changed files with 529 additions and 6 deletions

View file

@ -36,6 +36,7 @@ function cam_init(aspect: int) -> void {
cam_update()
}
function cam_begin_frame(n: int, w: int, h: int) -> void {
gsl_jitter_frame()
cam_update()
}
function cam_set(x: int, y: int, z: int, yaw_deg: int, pitch_deg: int) -> void {
@ -56,6 +57,12 @@ function cam_update() -> void {
m4_perspective(cam_proj, cam_fov, cam_aspect, cam_near, cam_far)
m4_mul(cam_vp_clean, cam_proj, cam_view)
m4_inverse(cam_inv_vp_clean, cam_vp_clean)
# DLSS's sub-pixel jitter (streamline.ludic), in the projection the scene draws with only:
# culling, depth reconstruction and last frame's matrix keep the clean one
if gsl_jitter_x != 0 or gsl_jitter_y != 0 {
cam_proj[8] = f_sub(cam_proj[8], gsl_jitter_x)
cam_proj[9] = f_sub(cam_proj[9], gsl_jitter_y)
}
m4_mul(cam_vp, cam_proj, cam_view)
m4_inverse(cam_inv_vp, cam_vp)
m4_inverse(cam_inv_proj, cam_proj)