Skip to content

runtime(zones,#804): in-proc D3D11 — MODE_ZONES composite, binary wish, opt-in feather - #809

Open
dfattal wants to merge 1 commit into
mainfrom
zones-804-d3d11-inproc
Open

runtime(zones,#804): in-proc D3D11 — MODE_ZONES composite, binary wish, opt-in feather#809
dfattal wants to merge 1 commit into
mainfrom
zones-804-d3d11-inproc

Conversation

@dfattal

@dfattal dfattal commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

In-proc D3D11 leg of #804 (leg 2; leg 1 = #808). Mirrors the VK reference (#801 merge 70b7826, #803 merge b0e5889) onto comp_d3d11_renderer + comp_d3d11_compositor.

#801

#803

  • New d3d11_update_zone_feather_mask: per-zone opt-in composite feather (VK raster_mask_zones semantics on the ClearView idiom — 2px steps, 64px ramp cap, small-zone clamp). Published wish stays binary; raster failure falls back binary (hard edges, never a lost frame).

Also: one-shot D3D11 Local2D composite … (mode=N) log; shaders/masked_composite.hlsl reference file caught up (had drifted since #491).

Expected deltas / regression control

  • Zones apps in-proc on D3D11: hard zone edges unless feather requested; Local2D overlays now composite by alpha inside zones (the VK invisible-toast fix, modelviewer#63/Upstream Monado cherry-pick (Windows) #64).
  • cube_handle_d3d11_win (legacy control): pixel-identical — everything is zones_frame-gated; LERP/ALPHA_OVER branches byte-equal.

⚠️ HW-behavior change — needs David's eyeball before merge.

Refs #800 #801 #803 #804.

🤖 Generated with Claude Code

…h, per-zone opt-in feather

In-proc D3D11 leg of the #801/#803 backend-parity port (mirrors the VK
reference, 70b7826 + b0e5889):

#801 semantics:
- masked_composite PS grows composite_mode (replacing the alpha_over bool):
  0 = hard M-lerp (explicit authored mask), 1 = #491 premul over (implicit
  legacy mask), 2 = MODE_ZONES: final = twod + (1-a)*(M*weave) - M gates
  only the WEAVE by zone geometry; Local2D overlays composite on top by
  their own premultiplied alpha (a toast inside a full-window zone is no
  longer multiplied away; the window-edge vignette is gone).
- The auto wish raster goes BINARY (M=1 per zone rect, no 16px ring): the
  wish is HARDWARE-only (ADR-027) and hard-edged by default (#800).
- The composite mask is ALWAYS the binary zone raster - an explicit frame
  wish is PUBLISH-ONLY (d3d11_sync_zone_mask_to_dp unchanged), never a
  compositor blend gate. d3d11_update_zone_wish_state now maintains the
  auto raster even when an explicit wish is staged.

#803 (XrDisplayZoneFeatherDXR):
- New d3d11_update_zone_feather_mask: when any zone requests feather, the
  composite samples a separately-rastered per-zone mask (hard or inward
  0->1 ramp per zone, 2px steps, ramp cap 64px then wider steps, small-zone
  inset clamp - the VK raster_mask_zones semantics on the ClearView idiom).
  The published wish stays binary regardless; raster failure falls back to
  the binary mask (hard edges, never a lost frame). Dirty-checked on
  rects + radii + dims; no zone_publish_seq bump (composite-only).

Also: one-shot "D3D11 Local2D composite ... (mode=N)" log per the VK leg;
shaders/masked_composite.hlsl reference caught up (it had drifted - no
alpha_over field since #491).

Legacy frames (cube_handle_d3d11_win, engine legacy sessions) are
byte-identical by the zones_frame gate: LERP/ALPHA_OVER branches keep
their exact semantics.

Refs #800, #801, #803. VK reference: #801/#803 merges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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