Skip to content

Cabinet projection support - #31

Merged
freezy merged 3 commits into
masterfrom
feat/cabinet-view
Oct 15, 2026
Merged

freezy merged 3 commits into
masterfrom
feat/cabinet-view

Conversation

@freezy

@freezy freezy commented Oct 15, 2026

Copy link
Copy Markdown
Member

HDRP side of the cabinet projection (engine: freezy/VisualPinball.Engine#589).

  • HdrpCabinetProjectionAdapter: applies the off-centre projection through nonObliqueProjectionGetter, resets the HD camera's history when the projection changes, and reports an enclosing field of view and aspect so culling and effects that read them stay correct. TAA falls back to SMAA while the projection is active, because TAA's history doesn't survive the custom projection.
  • HdrpGraphicsApplier: maps the anti-aliasing setting explicitly. SMAA and TAA were swapped before because the code relied on the enum order (None, FXAA, TAA, SMAA in HDRP).
  • Shared insert shaders and presets (a6d4958): carried on this branch; it wasn't merged with the earlier insert work.

Use the insert graphs, HLSL and presets from the main VPE package, retaining their existing asset GUIDs.
HdrpWindowProjectionAdapter hands HDRP's light loop the actual off-centre
projection through nonObliqueProjectionGetter, sets a symmetric field of
view and aspect enclosing it for planar probes, and resets the camera's
history when the view jumps. HDRP 17.5 sizes TAA's jitter wrongly for
same-sign frusta, so the cabinet view falls back to SMAA.

The graphics applier mapped VPE's anti-aliasing modes onto HDRP's enum by
value, but HDRP orders TAA before SMAA, so choosing one gave the other.
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no actionable defects were established.

Summary

Adds HDRP support for cabinet projection and fixes the SMAA/TAA setting mapping.

  • HDRP cameras now follow the engine’s off-centre cabinet view.
  • HDRP applies the chosen anti-aliasing mode and uses SMAA for cabinet TAA.
  • HDRP no longer carries local insert shader and preset copies.

No actionable defects were established. Unity rendering was not run, and the external engine and shared asset packages were unavailable for direct checks.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Cabinet camera attaches] --> B[Save HDRP camera settings]
  B --> C[Install projection getter]
  C --> D[Apply allowed anti-aliasing]
  E[Projection changes] --> F[Update saved projection]
  E --> G[Apply enclosing field of view and aspect]
  F --> H{Discontinuous change?}
  H -->|Yes| I[Reset camera history]
  J[Cabinet camera detaches] --> K[Restore previous getter]
  K --> L[Reset history and reapply anti-aliasing]
Loading

Reviews (1) · Last reviewed commit: "projection: rename window projection to ..." · Reviewed by Greptile

@freezy
freezy merged commit b2da72d into master Oct 15, 2026
5 checks passed
@freezy
freezy deleted the feat/cabinet-view branch October 15, 2026 12:42
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