Skip to content

pcbview 1.22.0 — VR

Choose a tag to compare

@github-actions github-actions released this 29 Jul 16:08
· 26 commits to main since this release

VR mode

pcbview now renders to an OpenXR headset. Developed against a PSVR2 over
SteamVR; anything OpenXR should work, though nothing else has been tried.

VR mode is on the menu bar. Toggling it rebuilds the viewport, because
OpenXR wraps Vulkan instance and device creation and so has to be running
before either exists — the board, camera and explode state carry across.

What is in it:

  • Stereo rendering at the runtime's own per-eye resolution, with the
    asymmetric per-eye frusta the headset actually reports.
  • A submitted depth layer (XR_KHR_composition_layer_depth), so a dropped
    frame is reprojected by geometry rather than slid about as a flat sheet.
  • The hidden-area mesh (XR_KHR_visibility_mask), so the corners the lenses
    never show are not shaded.
  • Fixed foveation via VK_KHR_fragment_shading_rate, and a quality ladder
    that trades ray count, shading rate and render resolution against a
    measured cost model to hold 90 Hz.
  • Sense controller grips: reach out and take hold of the board.

Controls

The pad works the same on a monitor and in the headset, so there is one set
to learn:

L1 / R1 shrink / grow the board
L2 / R2 push further / bring nearer (pressure-proportional)
Hold + L2/R2 collapse / explode the stack
D-pad quarter-turns — up/down tumble, left/right spin
Hold + D-pad fit / iso / top / bottom, labelled on screen

Explode moved onto a chord. It used to be L2/R2 alone, until a zoom
control briefly shared those triggers and every attempt to zoom quietly
peeled the stack apart — reported, in good faith, as the silkscreen floating
above the board and the mask turning transparent. The controller map in the
README is updated to match.

Fixed

  • Close-range instability in the headset. The board's face appeared to
    jump and swim when approached, on the lit side but not the shadowed one.
    The cause was an unbounded shadow ray: on the lit side it traversed the
    whole acceleration structure, on the dark side it terminated on the first
    hit, so the cost was wildly asymmetric and the frame rate fell exactly
    where the geometry was most detailed. The ray is now capped by range.

  • The VR readout was unreadable. Not for any of the reasons first
    guessed. The panel was drawn at a fixed distance across a board at arm's
    length, which put about 7 degrees of vergence between the text and what it
    was written on — more than ten times what can be fused, so whichever one
    the eyes settled on, the other doubled. It now sits at the board's own
    depth, latched when it appears so it holds still while it is read.

  • Effects did not reach the headset. Entering VR builds a new renderer,
    and the appearance settings were being pushed in a race against its
    creation. Losing that race left the headset on the renderer's defaults,
    which read as the chips going matte in VR.

  • The status bar claimed "ray tracing" while path tracing was running,
    which is a small thing that misled a real diagnosis for several rounds. It
    reports the actual render mode now.

Known

  • The quality ladder can change render resolution several times in quick
    succession as the board moves through the view. Each change rebuilds the
    per-eye targets and costs a few milliseconds, so it is visible as an
    occasional hitch rather than as a dropped frame. Being worked on.
  • Path tracing in the headset is slow, and SteamVR does not enjoy it.
    Ray-traced raster is the mode to use in VR.
  • No OpenXR action manifest is shipped yet, so controller bindings are not
    rebindable from SteamVR's own UI.