Skip to content

Picture in Picture Port | True PiP [Multithreaded] - #615

Draft
TheLostInPlace wants to merge 4 commits into
themrdemonized:all-in-one-vs2022-wpo-mtfrom
TheLostInPlace:pip-rc
Draft

TheLostInPlace wants to merge 4 commits into
themrdemonized:all-in-one-vs2022-wpo-mtfrom
TheLostInPlace:pip-rc

Conversation

@TheLostInPlace

Copy link
Copy Markdown
Contributor

True picture-in-picture scopes + authored per-scope optics + SVP DLSS-SR scaffolding (DX11, MT)

Summary

Adds true picture-in-picture (PiP) scope rendering to the MT engine: the scoped image is a real
second render of the scene from the optic's camera, composited through the lens instead of the flat
FOV/zoom trick. On top of that it adds an authored per-scope optics layer, real objective
geometry, objective diameters from manufacturer spec sheets, and authored magnification ranges drive
the rendered image, so a 3-10x scope renders a true 3-10x and the magnification readout shows the
rendered value, plus optical realism derived from that data (exit-pupil twilight dimming,
near-field defocus, parallax focus, field curvature, veiling glare, a photometric eye model),
mechanical zoom feel (click-lever dual-state optics, analog and stepped zoom, magnification-
proportional sensitivity), per-viewport correctness (motion vectors, TAA, lighting, local
exposure), NVG and thermal support through the optic, SVP performance levers (frustum +
small-object + grass culling, adaptive scope resolution, dead-corner stencil, light cone cull,
supersample), a diagnostics suite (dedicated pip.log channel, one-shot config registry dump,
stats overlay, crash-context ring), and all engine-side scaffolding for a future DLSS-SR upscale
of the scope render (reconstruction left as a documented stub).

The feature is additive and off by default. With r__svpscope 0 the render is byte-identical to
stock MT. The true-PiP render passes live in the R4 (DX11) renderer; every shared-layer touch is
gated on the SVP pass being active, which only R4 ever raises, so R1/R2/R3 never enter a PiP path.

  • Base branch: all-in-one-vs2022-wpo-mt
  • Scope: 151 files, +10,023 / -501, 1 commit

Requirements

PiP renders the scene into the in-world scope lens, so it relies on the 3D Shader Scopes (3DSS)
GAMMA
addon to supply the lens geometry, the reticle, and the per-scope data this feature reads.
3DSS is bundled in GAMMA, so GAMMA users have it by default. Without 3DSS (or an equivalent
scope-lens setup) there is no lens surface for the PiP image to composite into.

The per-scope data is consumed in tiers with graceful fallback at every level:

  • magnifications (the key 3DSS authors for PiP consumption, e.g. 3-10, 1,4, 2.8) drives the
    rendered zoom range directly; weapons with integrated scopes resolve their scope section the same
    way 3DSS itself does. Scopes without it fall back to the singular magnification key, then to the
    legacy scope_zoom_factor derivation.
  • scope_objective_lens_offset (authored objective geometry) drives the front plane and aperture;
    s3ds_objective_mm (real spec-sheet objective diameters, shipped in this PR for common optics)
    drives the true exit pupil. Scopes without either fall back to measured lens geometry.

A small companion patch to the 3DSS scope-glass headers (integrating the shader hook layer shipped
in this PR) is distributed alongside the builds rather than inside this PR, since those files belong
to the 3DSS mod; every hook in it is inert without a PiP exe.

What's new (user-facing)

  • True PiP scope - a live second-viewport render sampled by the lens shader (real parallax,
    depth, and lighting inside the optic). r__svpscope 1 renders from the eyepiece; r__svpscope 2
    renders from the optic's entrance pupil, with the weapon drained through the same camera so the
    barrel's visibility through the glass is decided by geometry, not a shader trick
  • Authored magnifications - scopes that author a magnifications range render it as true
    magnification; the readout, wheel steps, click levers, and scoped sensitivity all follow. Nothing
    is fudged to match tooltips: the number shown is the number rendered
  • Click-lever optics - dual-state scopes (SpecterDR class, zoom_step_count = 1 or a comma
    magnifications pair) throw between their two detents like the real lever, with a brief transition
    shadow sweep; variable scopes keep smooth, stepped, or analog zoom (g_zoom_smooth,
    g_zoom_analog, g_zoom_clicks)
  • Optical realism from real data - exit-pupil twilight dimming, near-field defocus of the barrel
    and hands, thin-lens parallax focus, field-curvature edge softness, lens coating transmission,
    off-axis veiling glare (Stiles-Holladay falloff), a Moon-Spencer photometric eye model,
    illuminated-reticle washout, heat mirage under magnification, and rain droplets on the objective
  • Scoped feel - magnification-proportional mouse sensitivity with a tunable response curve, the
    dialed magnification held through the raise, an auto-zero cap so shots converge on the aimed
    surface, and camera-effector unification so kicks move the world and the weapon coherently
  • NVG and thermal through the optic - night vision amplifies the scope image correctly (with a
    highlight bleach roll-off), thermal displays get a digital-sensor simulation
  • Binoculars and flat-panel optics - see-through window optics render the panel's true window
    subtense; reflex/holo dots can render as a collimated proxy under a magnifier
  • Per-viewport correctness - per-viewport motion vectors, a TAA sovereignty mask over the
    composited lens, scope-local eye adaptation, bloom and emissive replay so lamps glow through the
    glass, and contrast-adaptive sharpening
  • SVP performance - frustum culling to the scope cone, magnification-aware small-object culling,
    grass cone culling, adaptive scope resolution sized to the on-screen lens disc, dead-corner
    stenciling outside the disc, light cone culling, and optional supersampling
  • Diagnostics - a dedicated pip.log channel, a one-shot [SVP-CFG] dump of every PiP cvar on
    the first scoped frame (any tester log identifies its build and config), a per-viewport stats
    overlay, and an SVP crash-context ring copied into crash dumps
  • Gated DLSS-SR plumbing for the scope render (reconstruction not yet implemented)

Console variables

Console variables (92 total: 75 r__svp/r__scope, 13 g_, 3 s3ds_, 1 vector)

Defaults are the shipped values; every default is chosen so the out-of-box result is the physical
behavior. r__svpscope 0 makes all of them inert.

Core

cvar type [range] default purpose
r__svpscope int [0,2] 0 true PiP scope mode (0 off, 1 eyepiece, 2 objective/entrance pupil)
r__scope_debug int [0,4] 0 scope debug overlay level

Authored / per-scope optics

cvar type [range] default purpose
r__svp_authored_optics int [0,1] 1 use authored scope_objective_lens_offset for front plane + aperture (0 = measured geometry only)
g_svp_authored_mags int [0,1] 1 svp scopes read authored magnifications from the scope section (0 = legacy scope_zoom_factor)
r__svp_measured_optics int [0,1] 0 measured mesh-detected lens geometry fills unauthored optics (0 = authored/live only)
r__svp_obj_dist float [0.0,3.0] 1.0 svpscope 2 objective: scale on the auto geomscan front distance
r__svp_obj_size float [0.1,6.0] 1.0 svpscope 2 objective radius = eyepiece radius × this
r__svp_focal_derive int [0,1] 1 focal anchors derive from eye relief + tube length (0 = fixed split)
r__svp_ratio_derive int [0,1] 1 fit-ratio latch band derives from measured noise
r__svp_settle_derive int [0,1] 1 eyebox settle + recoil windows derive from the weapon's authored timing
s3ds_objective_mm float [0.0,200.0] 0 per-scope objective clear aperture mm, pushed by the scope script
s3ds_middle_grey float [0.0,2.0] 0 per-scope SVP tonemap middle-grey override (0 = inherit main)
s3ds_adapt_speed float [0.0,20.0] 0 per-scope SVP tonemap adaptation speed override (0 = inherit main)
scope_objective_lens_offset vector4 (0,0,0,0) per-scope objective geometry: x/y lateral, z forward, w radius (eyepiece-radius units), pushed on aim change

Optical realism

cvar type [range] default purpose
r__svp_twilight float [0.0,1.0] 1.0 exit-pupil twilight dimming as zoom shrinks the exit pupil below the dark-adapted eye
r__svp_near_blur float [0.0,3.0] 1.0 near-field defocus strength on the scope image (svpscope 2)
r__svp_focus_m float [10.0,1000.0] 100.0 parallax focus distance in meters, off-plane objects defocus by the thin-lens law
r__svp_parallax float [0.0,10.0] 0.0 reticle parallax, 0 = pinned center, 1 = real eye-deflection response
r__svp_chroma int [0,1] 1 keep authored per-scope chromatic aberration on glass, scaled by zoom
r__svp_field_curve float [0.0,3.0] 1.0 field-curvature edge softness, outer field blurs like a real non-flat-field scope
r__svp_coating float [0.0,1.0] 0.0 lens coating: multi-coat transmission loss + warm tint
r__svp_veiling_glare float [0.0,3.0] 0.0 off-axis sun-scatter wash near the sun
r__svp_glare_model int [0,1] 1 veiling-glare falloff: 1 = Stiles-Holladay 1/θ², 0 = legacy cone
r__svp_photo_model int [0,1] 1 eye photometrics: 1 = Moon-Spencer pupil model, 0 = legacy linear
r__svp_reticle_washout float [0.0,2.0] 0.0 illuminated reticle wash-out vs a bright background
r__svp_acog_fiber int [0,1] 0 ACOG fiber brightness source: 1 = sun visibility, 0 = scene luminance
r__svp_mirage float [0.0,3.0] 0.0 heat mirage on distant ground, grows with sun heat and magnification
r__svp_rain_optic float [0.0,3.0] 1.0 rain droplets on the objective glass, scaled by rain density
r__svp_roll_stabilize int [0,1] 0 level the scope world on lean/cant (0 = image tilts with cant, realistic)
r__svp_autoflip int [0,1] 1 auto-correct a mesh-inverted lens
r__svp_autoflip_reticle int [0,1] 1 auto-correct a mesh-inverted reticle to match
r__svp_clean_optics int [0,1] 1 strip the 3DSS flat-scope cosmetics (parallax shadow, chromatism, nvg blur, fisheye) for a clean true image
g_svp_crescent int [0,1] 0 swing-crescent master switch under a pip scope

Zoom and feel

cvar type [range] default purpose
g_svp_zoom_base int [0,1] 1 true svp scopes derive the bottom detent in the authored 75 base so it renders 1x at any fov
g_zoom_clicks int [0,1] 1 a dual-state scope clicks between its two detents, ignoring analog/smoothing
g_zoom_smooth float [0.0,60.0] 12.0 dynamic-scope zoom smoothing rate (lerp/sec), 0 = instant stepped
g_zoom_analog float [0.0,200.0] 0.0 analog zoom, 0 = discrete config steps, higher = finer steps
g_svp_sens float [0.1,3.0] 1.0 scoped mouse sensitivity multiplier
g_svp_sens_curve float [0.0,2.0] 1.0 zoom-sens response exponent, 1 = proportional to magnification, 0 = flat
g_svp_zoom_sync int [0,1] 1 svp renders the dialed magnification through the raise
g_svp_zero float [0.0,1000.0] 100.0 auto-zero cap in meters, shots converge on the aimed surface up to this range
g_svp_unify_cam_fx int [0,1] 1 camera-only effector kicks also rotate the weapon while scoped
g_svp_world_cam_fx int [0,1] 1 cam effectors keep driving the main view while scoped
g_svp_hud_true_fov int [0,1] 0 hud weapon renders at the true scene fov while scoped
r__svp_recoil_hold int [0,1] 1 optics derivation holds through the post-shot window
r__svp_lens_reject int [0,1] 1 while aimed, reject a far-jumping eyepiece pose and hold the last good one
r__svp_drain_anchor int [0,1] 1 drain clip-on window widens to the authored front plane
r__svp_hud_fov_match int [0,2] 2 barrel mapping: 2 magnifies with the wheel, 1 fixed 1:1 window, 0 legacy
r__svp_hud_full int [0,2] 2 barrel: 2 front-plane clip (default), 1 full barrel from the eye, 0 objective clip

Image pipeline

cvar type [range] default purpose
r__svp_taa_mask int [0,1] 1 stamp a taa mask over the composited lens so the main resolve keeps it
r__svp_jitterfix int [0,1] 1 lens edge jitter pre-pass
r__svp_distort_guard int [0,1] 1 stamp the distort mask neutral over the composited lens
r__svp_sharpen float [0.0,1.0] 0.35 contrast-adaptive sharpen on the scope image
r__svp_sharpen_falloff float [0.0,1.0] 0.0 sharpen radial falloff toward the disc rim
r__svp_sharpen_inner float [0.0,1.0] 0.0 sharpen inner crisp-zone radius
r__svp_local_exposure int [0,1] 1 scope-local eye adaptation from the scope's own measured exposure
r__svp_exposure_bias float [-3.0,3.0] 0.0 local-exposure bias in stops
r__svp_bloom int [0,1] 1 bloom on the scope pass so magnified bright sources flare
r__svp_emissive int [0,1] 1 replay self-illum geometry into the scope so lamps glow through
r__svp_skip_motionblur int [0,1] 1 skip motion blur on the scope pass
r__svp_skip_hud_distort int [0,1] 1 skip hud-layer distortion on the scope pass
r__svp_skip_dof int [0,1] 0 skip the scope-internal dof pass
r__svp_skip_lut int [0,1] 0 skip the scope-internal lut grade
r__svp_skip_ssr int [0,2] 1 scope reflections: 0 reflective+SSR, 1 flat+SSR, 2 flat no-SSR
r__svp_skip_volumetric int [0,1] 0 skip volumetric lights on the scope pass
r__svp_skip_grass int [0,1] 0 skip grass/details on the scope pass

NVG / thermal

cvar type [range] default purpose
r__svp_thermal_sim int [0,1] 1 digital-sensor sim on thermal displays: sensor grid + per-cell noise
r__svp_nvg_bleach float [0.0,1.0] 0.0 NVG highlight bleach roll-off, bright sources compress instead of clip
r__svp_nvg_sensitivity float [0.1,4.0] 1.0 NVG bleach onset sensitivity

Performance

cvar type [range] default purpose
r__svp_cull int [0,1] 1 frustum-cull scope geometry to the scope cone
r__svp_cull_ssa float [0.0,8.0] 4.0 magnification-aware small-object cull strength
r__svp_cull_grass int [0,1] 1 cull grass instances to the scope cone
r__svp_lod float [0.0,1.0] 0.0 scale scope LOD selection to true pixel coverage
r__svp_adaptive_res float [0.0,2.0] 1.2 size the SVP render to the on-screen eyepiece disc × margin
r__svp_adaptive_grow int [0,1] 0 allow sizing up past the half-height base (up to 4x pixels)
r__svp_supersample float [1.0,2.0] 1.0 over-render the SVP so the eyepiece downsamples it (SSAA)
r__svp_light_cull int [0,1] 1 cone-cull the mirrored light blends
r__svp_corner_mask int [0,1] 1 stencil the dead corners outside the eyepiece disc
r__svp_npc_detail int [0,1] 1 keep dynamic parts the main view discards as subpixel (distant NPC heads)
r__svp_light_capture int [0,1] 1 capture lights for the scope cone past the main frustum/fog cull
r__svp_sss_sun int [0,1] 0 compute the scope SSS pass and keep the sun contact-shadow term (expensive)

Diagnostics

cvar type [range] default purpose
r__svp_diag int [0,1] 0 perf diagnostics log
r__svp_cop_diag int [0,2] 0 optics diagnostics: 1 throttled, 2 per-frame
r__svp_stats int [0,2] 0 per-viewport render-stats overlay, 1 compact, 2 per-section
r__svp_report int [0,1] 0 one-shot config + files re-dump, self-clearing
r__svp_uv_debug int [0,1] 0 paint the scope by sample V to spot a flipped lens UV
r__svp_rain_debug float [0.0,3.0] 0.0 force scope rain regardless of weather
r__3db_debug int [0,3] 0 ballistics overlay: 1 markers+axes, 2 +zeroed ray, 3 +tracers

DLSS scaffolding

cvar type [range] default purpose
r__svp_dlss int [0,1] 0 DLSS-SR master gate, 0 = stock (render_scale inert)
r__svp_render_scale float [0.5,1.0] 1.0 SVP render scale, takes effect on vid_restart

Misc

cvar type [range] default purpose
r__svp_flat_window int [0,1] 1 flat-screen optics render the panel's see-through window subtense
r__svp_reflex_capture int [0,1] 0 reflex/holo dot: 1 = collimated proxy in the magnifier viewport

How it works

Second viewport. When PiP is active the frame runs an extra scene pass for the optic camera into
a dedicated second-viewport target. At r__svpscope 0 the legacy throttled SVP behaviour is
unchanged; when on, per-pass selection routes work between the scope pass and the main pass.

Entrance-pupil camera (r__svpscope 2). One camera renders both world and weapon: the world
renders from the entrance pupil slid up the optical axis to the scope's front plane (authored
geometry when present, measured otherwise), and the weapon drains through the same camera, so
geometry behind the pupil falls behind the near plane and the barrel's visibility through the glass
is decided by real projection, not a shader guess.

Lens composite. The scope target is sampled by the lens shader and
composited on-screen with the reticle. The render FOV is solved through the on-screen eyepiece fit
ratio so that the displayed magnification, the rendered magnification, and the authored
magnification are the same number - a factor-100 scope renders exactly naked-eye 1x at any user FOV,
and an authored 3-10 renders a true 3x to 10x.

Authored data flow. A companion script pushes per-scope objective geometry, spec-sheet objective
diameters, and optional tonemap overrides to the engine on aim change; the engine reads authored
magnification ranges directly from the scope section at zoom setup, resolving integrated-scope
weapon variants through their parent section exactly the way 3DSS itself does. Every consumer falls
back cleanly when data is absent.

Per-viewport correctness. Previous-frame matrices, foliage transforms, and the sky reprojection
are tracked per viewport; the scope pass writes its own motion vectors and the composited lens is
protected from the main TAA resolve by a mask stamp, so the image stays temporally stable while
panning. Scope-local exposure adapts to what the optic actually sees.

Performance. The scope geometry is frustum-culled to the cone, a magnification-aware
small-object cull drops clutter the magnified cone cannot resolve (the SVP g-buffer is draw-call
bound, so this is the main lever), grass is cone-culled, lights are cone-culled, the corners outside
the disc are stenciled dead, and adaptive resolution sizes the render to the on-screen lens disc.

Diagnostics. PiP logs to its own pip.log. The first scoped frame prints a one-shot [SVP-CFG]
registry dump of every PiP cvar (registry-driven, so it cannot drift from the code), and every
behavioral subsystem has a proof line, so any tester log identifies its build, config, and which
paths actually ran. An SVP state ring is copied into crash dumps.

DLSS-SR scaffolding (gated, eval stubbed)

All engine-side plumbing for a Streamline DLSS-SR upscale of the scope render is present behind
r__svp_dlss, with the reconstruction itself left as a documented stub:

  • scope rendered at a render-extent (g-buffer, lighting, and motion vectors scale together)
  • sub-pixel jitter baked into the scope projection (placeholder Halton sequence)
  • engine AA skipped under the gate so the eval receives a raw aliased and jittered image
  • an atomic history-reset flag fired on the events that should reset temporal history
  • a POD input contract (SvpDlss.h) carrying color, depth, and motion-vector SRVs, the output
    target, matrices, jitter, and camera params, with zero sl:: / NGX dependencies
  • the eval is a passthrough, and replacing its body is the only remaining step

Invariants held: at r__svp_dlss 0 the output and GPU work are byte-identical to the non-DLSS
path for any r__svp_render_scale; the single game-to-render flag is a std::atomic.

Compatibility and safety

  • DX11 (R4): the feature
  • DX10/9/8 (R3/R2/R1): the shared svp_ translation units compile there, but the PiP passes are
    driven only by the R4 renderer, so every shared gate stays cold and the paths collapse to stock
  • Off by default: r__svpscope 0 is stock behaviour, verified byte-identical at the gate
  • All PiP engine code lives in prefixed svp_* translation units (27 new files) with the stock
    touch points kept small and individually gated, so the diff is reviewable by subsystem

Testing

Tested on Anomaly 1.5.3 with GAMMA 0.9.5 (3D Shader Scopes, SSS, Atmospherics) through an extended
release-candidate cycle with external testers:

  • gate-off: byte-identical rendering verified at r__svpscope 0
  • PiP on: live scene through the optic with correct lighting, parallax, and depth; authored
    magnification ranges verified against the log proof lines across the scope roster (LPVOs,
    dual-state levers, fixed magnifiers, integrated-scope weapon variants)
  • zoom feel verified: click levers land detents absolutely, analog and smooth zoom, true 1x at the
    bottom detent at any user FOV, magnification-proportional sensitivity
  • NVG and thermal through the scope, binocular flat-window optics, reflex-under-magnifier verified
  • TAA stability on pans verified at the pixel level with RenderDoc captures; per-viewport motion
    vectors confirmed
  • performance levers profiled with the built-in stats overlay and per-section counters
  • both shipping configs build green (DX11-AVX and DX11), all four renderer projects compile

Known limitations

  • The DLSS-SR reconstruction is not implemented; r__svp_dlss 1 runs a passthrough stub
  • Barrel-through-scope rim continuity at low magnification is a structural limit of two projections
    sharing one rim; near-field defocus is the shipped mitigation and a fuller continuity program is
    designed and in progress
  • Mesh-measured lens auto-detection (r__svp_measured_optics) ships default-off as a diagnostic
    path; authored data is the production path
  • The 3DSS scope-glass integration patch (edited 3DSS shader headers calling the hook layer shipped
    here) is distributed with the builds rather than in this PR, since those files belong to the 3DSS
    mod; all hooks are inert without a PiP exe

Attribution

The true picture-in-picture scope code was written by m22spencer. This work is a port and
continuation of it from the gc64 fork that adopted it
(CnRJay/xray-monolith-gc64): the DX11 second-viewport
rendering, the lens composite, and the per-viewport history follow that implementation. The
entrance-pupil camera, the authored per-scope optics and magnification layer, the optical realism
set, the zoom mechanics, the per-viewport TAA/MV work, the performance levers, the diagnostics
suite, and the DLSS contract were added on top.

  • m22spencer: original author of the true PiP scope implementation
  • gc64 (CnRJay/xray-monolith-gc64): the fork that adopted it, the source this port started from
  • Redotix99, 3D Shader Based Scopes (3DSS): the scope lens and reticle content this builds on
  • AndTheHeroIs: 3DSS for GAMMA and the authored per-scope data conventions this feature consumes (magnifications, objective lens geometry)
  • themrdemonized: the base xray-monolith engine this targets

Files changed

151 files, grouped by area

Gamedata — scripts

  • gamedata/scripts/zzz_extra_scope_features.script (new): pushes per-scope optics data to the engine on aim
  • gamedata/scripts/options_modded_exes_pip.script (new): the PiP options page in the Modded Exes menu
  • gamedata/scripts/_imgui_groups.script, options_modded_exes_visual.script: options wiring

Gamedata — configs

  • gamedata/configs/pip_objective_mm.ltx (new): real objective diameters from spec sheets
  • gamedata/configs/mod_system_pip_tonemap.ltx (new): optional per-scope svp tonemap overrides
  • gamedata/configs/text/eng/ui_mm_modded_exes.xml: option strings

Gamedata — shaders (r3, all new)

  • svp_hooks_{common,image,lens,reticle,shadow}.h: the shader hook layer the 3DSS glass patch calls into
  • svp_nearblur.{ps,s}: near-field defocus; svp_distort_stamp.{ps,s}, svp_taa_stamp.{ps,s}: distort/TAA mask stamps over the composited lens
  • scope_color_write.s, scope_vertex.vs, scope_depth_write.{ps,s}, scope_custom_depth.h, scope_defines.h, scope_debug.{ps,s}: the second viewport's own render, depth, and debug passes
  • gamedata/textures/fx/svp_rain.dds (new): rain-on-objective texture

Console / cvars

  • src/Layers/xrRender/svp_console.cpp/.h (new): the r__svp_* cvar set + the inert-path ledger sweep
  • src/xrEngine/svp_gameplay_cvars.cpp/.h (new): the g_svp_* / g_zoom_* gameplay cvars
  • xrRender_console.cpp/.h, xr_ioc_cmd.cpp, XR_IOConsole.cpp, console_registrator_script.cpp, level_script.cpp

Shared render layer (xrRender)

  • New: svp_constants.cpp/.h (shader constant binders + boot validation), svp_dsgraph_cull.cpp (scope frustum cull), svp_hud_latch.cpp (hud pose latch + weapon drain), svp_lens_detect.cpp/.h + svp_lens_detect_math.cpp/.h (per-visual lens auto-detection), Debug/renderdoc_app.h (in-app capture API)
  • Modified: dsgraph build/render/manager/types (scope-pass routing + culling), rendertarget_phase_nightvision.cpp (scope capture seam + NVG), rendertarget_phase_smaa.cpp (TAA resolve seams), dxEnvironmentRender.cpp (per-viewport sky), R_sun.cpp + lights_render.cpp + Light_DB.cpp (per-viewport lighting), R_Backend* + Blender_Recorder_StandartBinding.cpp (per-viewport matrices + binders), DetailManager_VS.cpp, FTreeVisual.cpp, SkeletonX.cpp/.h, SkeletonCustom.h, Shader.h, HW.h, dxRenderDeviceRender.cpp, particle files (scoped distort handling), Include/xrRender interface headers

DX11 / R4 (the PiP engine)

  • New: svp_camera.cpp/.h (the scope camera build), svp_optics.cpp (scope render passes + optics derivation), svp_target.cpp/.h (SVP render-target policy), svp_stats.cpp/.h (stats overlay + counters), SvpDlss.h (DLSS input contract)
  • Modified: r4.cpp/.h, r4_R_render.cpp, r4_rendertarget.cpp/.h, r4_rendertarget_phase_combine.cpp, r4_rendertarget_phase_luminance.cpp

DX10 layer

  • dx10DetailManager_VS.cpp, dx10EventWrapper.cpp/.h, dx10HW.cpp, dx10ResourceManager_Scripting.cpp, dx10SH_RT.cpp

Engine (xrEngine)

  • New: svp_state.h (the cross-thread second-viewport state block), svp_crash_context.cpp/.h (SVP state ring in crash dumps)
  • Modified: device.cpp/.h, CameraManager.cpp/.h, x_ray.cpp, bone.h, imgui_base.cpp

Core (xrCore)

  • New: svp_log.cpp/.h (the pip.log channel)
  • Modified: Xr_ini.cpp, xr_ini.h, _matrix.h, log.h

Game (xrGame)

  • New: svp_mags.cpp/.h (authored magnification parsing + zoom range resolve), svp_weapon.cpp (weapon-side svp state publish)
  • Modified: Weapon.cpp/.h, WeaponAK74.cpp, WeaponBinoculars.cpp/.h, WeaponBinocularsVision.cpp, Actor.cpp/.h, ActorCameras.cpp, ActorEffector.cpp, ActorInput.cpp, Actor_Weapon.cpp, HudItem.cpp, ShootingObject.cpp, ParticlesObject.cpp/.h, Level.cpp, UIGameCustom.cpp/.h

Build

  • .gitignore, the seven vcxproj/.filters project files registering the new svp_ translation units (R1/R2/R3 project files are insertion-only)

…d stop

the near field blur moves into its own module and rides the real
circle of confusion at the svp near plane, samples a mip prefiltered
source and advances geometrically so thin blur bands are not skipped.
r__svp_near_pupil and r__svp_drain_clip sit default off for barrel
seam testing and the ocular field stop derives its rim band from the
exit pupil geometry
…lass disc

the wpn dof constant zero gate now rides r__svp_wpn_dof default 1 so
the sss aim blur reaches the gun again. the custom depth stamp clips
to the glass disc so the housing keeps real gbuffer depth and blurs
with the hands, the magnified image stays far and sharp
…ster log

authored and detent base scope mins rescale to the aim fov like the
max bound and the scope params floor scales the whole encoding by one
factor, so ffp reticle size no longer moves with either fov slider.
flat window optics with authored magnifications zoom with the click
and the cfg and files report prints to pip.log for a single tester file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant