Skip to content

desktop-avatar: report content bounds for the rear depth budget - #14

Merged
dfattal merged 2 commits into
mainfrom
feat/depth-budget-desktop-avatar
Sep 6, 2026
Merged

dfattal merged 2 commits into
mainfrom
feat/depth-budget-desktop-avatar

Conversation

@dfattal

@dfattal dfattal commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Draft — blocked on the plugin release. The committed pin here is still #upm/v2.14.0, which predates DisplayXRContentBounds; this branch does not build until the pin is bumped to the release carrying DisplayXR/displayxr-unity#318 (PR DisplayXR/displayxr-unity#319, CI green). That bump is the next commit on this branch.

What

The plugin now consumes the runtime's advisory rear depth budget (XR_DXR_depth_budget): a transparent overlay may show what is behind its display plane when the desktop right behind the content carries no horizontal depth cue. The runtime decides that from a background measurement — and without a content region to aim at it judges the whole window, so an empty Notepad's own menu and status bars are enough structure to keep the clip shut while the tiger stands in the opposite corner.

TransparentAutoSetup now attaches DisplayXRContentBounds to the first silhouette target, pinned to exactly the renderer list the click-through mask is cut from, so the region the runtime measures is the geometry the user actually sees. Nothing else changes: ClipAtDisplayPlane still owns foregroundOnlyClip, and against a runtime without the extension the clip stays on the plane.

Verification

Built and run on the panel against a local plugin pin (runtime v2.16.13). The runtime log shows the bounds arriving and narrowing the analysis region, and the verdict tracking the background:

REAR_BUDGET d3d12: roi=16,4,38,34 (app content bounds)
REAR_BUDGET state=ClippedNoSource -> ClippedBusyBackground cue=1.00   (busy desktop)
REAR_BUDGET state=Open cue=0.00                                       (plain window behind)
REAR_BUDGET rear volume OPEN: 214.191 world units (farOffsetVH=107.1)
REAR_BUDGET state=ClippedBusyBackground; rear volume CLOSED: 0.000

The visual eyeball is still owed — the above is log evidence that the region and the value are right; nobody has yet watched the tiger's back grow in on the panel.

Unity's incidental rewrites of ProjectSettings/*.asset, URP-Pipeline.asset, UniversalRenderPipelineGlobalSettings.asset and OpenXR Package Settings.asset (pure line-ending churn plus one dropped OpenXR feature entry) were reverted rather than committed.

🤖 Generated with Claude Code

https://claude.ai/code/session_019JgFFrsR9dpT2anKy5AtYs

dfattal and others added 2 commits September 6, 2026 19:51
The plugin now consumes the runtime's advisory rear depth budget
(XR_DXR_depth_budget, displayxr-unity#318): a transparent overlay may show
what is behind its display plane when the desktop right behind the content
carries no horizontal depth cue. The runtime decides that from a background
measurement — and without a content region to aim at it judges the WHOLE
window, so an empty Notepad's own menu and status bars are enough structure
to keep the clip shut while the tiger stands in the opposite corner.

Attach DisplayXRContentBounds to the first silhouette target, pinned to
exactly the renderer list the click-through mask is cut from, so the region
the runtime measures is the geometry the user actually sees.

Nothing else changes: ClipAtDisplayPlane still owns foregroundOnlyClip, and
against a runtime without the extension the clip stays on the plane.

Verified on the panel (runtime v2.16.13): the runtime logs
`roi=16,4,38,34 (app content bounds)`, and the state tracks the background —
ClippedBusyBackground (cue=1.00) over a busy desktop, Open (cue=0.00) over a
plain one, with the rear volume resolving to 214.191 world units at
farOffsetVH=107.1. The visual eyeball is still owed.

NOTE: the committed plugin pin is still #upm/v2.14.0, which predates the
component — this branch does not build until the pin is bumped to the
release carrying displayxr-unity#318. That bump is the next commit here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019JgFFrsR9dpT2anKy5AtYs
… content mask)

Restores a released pin — the branch was carrying the local `file:` dev
override while the plug-in was being built, which the repo rule says must
never be committed.

v2.19.0 carries the background-aware foreground clip. Against runtime
v2.16.14+ the runtime judges the tiger's SILHOUETTE rather than a rectangle
around it; the mask producer is entirely plug-in side (the transparent
overlay already reads that silhouette back for SetWindowRgn), so the only
app-side contribution is the content region added in the previous commit.

Verified by building this sample against the RELEASED package, not the
worktree: UPM resolved `com.displayxr.unity@08ec4412cebb` (the upm/v2.19.0
tag commit) and the built player's displayxr_unity.dll is Authenticode
Valid, signed by Leia, Inc. — so the signed DLL reaches a consumer through
the git-URL channel, which is the half of the release that has silently
shipped unsigned before.

Panel behaviour verified on this sample: busy content inside the content box
but off the silhouette leaves the clip OPEN, the same stimulus on the body
closes it, and the pre-mask bounds path closes on both.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019JgFFrsR9dpT2anKy5AtYs
@dfattal
dfattal marked this pull request as ready for review September 6, 2026 22:10
@dfattal
dfattal merged commit 67ddf16 into main Sep 6, 2026
1 check passed
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