desktop-avatar: report content bounds for the rear depth budget - #14
Merged
Merged
Conversation
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
marked this pull request as ready for review
September 6, 2026 22:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft — blocked on the plugin release. The committed pin here is still
#upm/v2.14.0, which predatesDisplayXRContentBounds; 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.TransparentAutoSetupnow attachesDisplayXRContentBoundsto 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:ClipAtDisplayPlanestill ownsforegroundOnlyClip, 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:
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.assetandOpenXR 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