Skip to content

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

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

runtime(zones,#804): in-proc D3D12 — MODE_ZONES composite, binary wish, opt-in feather#810
dfattal wants to merge 1 commit into
mainfrom
zones-804-d3d12

Conversation

@dfattal

@dfattal dfattal commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

In-proc D3D12 leg of #804 (leg 3; legs 1-2 = #808/#809). Mirrors the VK reference (#801/#803) and the D3D11 leg (#809) onto comp_d3d12_renderer + comp_d3d12_compositor.

Engine-facing: per the corrected #804 analysis, Unity's Display Provider runs multi-zone display-zones on this backend — the shipping desktop-avatar sample (3D zone + Local2D bubble) changes pixels with this PR.

#801

  • masked_composite PS: alpha_overcomposite_mode (2 = MODE_ZONES: twod + (1−a)·(M·weave)).
  • Auto wish raster binary (one rect-array clear, no ring steps); still reuses the implicit-mask resources, re-recorded per zones frame.
  • d3d12_update_zone_wish_state always maintains the binary raster and returns it as the composite mask; an explicit frame wish stages to zone_publish_res only (publish-only).

#803

  • New d3d12_update_zone_feather_mask into its own R8 resources (per-zone hard/inward ramp, 2px steps, 64px cap, small-zone clamp). Published wish stays binary; failure falls back binary.

One-shot D3D12 Local2D composite … (mode=N) log.

Expected deltas / regression control

  • Unity desktop-avatar (in-proc D3D12 zones): needs the avatar-style hardware eyeball — hard zone/band edges unless feather requested; the Local2D bubble now composites by alpha over weave inside zones (same deltas as the VK avatar findings).
  • Legacy frames (Unreal plain projection, legacy Unity sessions, cube handle apps): pixel-identical (zones_frame-gated).

⚠️ 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 D3D12 leg of the #801/#803 backend-parity port (mirrors the VK
reference and the D3D11 leg). This is an ENGINE-FACING zones path: the
Unity Display Provider's desktop-avatar sample (3D zone + Local2D) runs
zones frames on comp_d3d12 today.

#801:
- masked_composite PS: alpha_over bool -> composite_mode (0 hard M-lerp /
  1 #491 premul over / 2 MODE_ZONES: final = twod + (1-a)*(M*weave)).
- Auto wish raster goes BINARY (one rect-array clear at 1.0, no ring
  steps); still reuses the implicit-mask resources and re-records every
  zones frame.
- d3d12_update_zone_wish_state now ALWAYS maintains the binary auto raster
  and returns it as the composite mask; an explicit frame wish stages and
  routes to zone_publish_res only (publish-only, never a blend gate).

#803 (XrDisplayZoneFeatherDXR):
- New d3d12_update_zone_feather_mask into its OWN R8 resources (per-zone
  hard or inward 0->1 ramp, 2px steps, 64px ramp cap, small-zone clamp;
  re-rastered per feathered zones frame, VK-style). Published wish stays
  binary; raster failure falls back to the binary mask.

One-shot composite log now carries mode=N. Legacy frames byte-identical
(zones_frame-gated; LERP/ALPHA_OVER semantics unchanged).

NEEDS avatar-style hardware eyeball before merge (Unity desktop-avatar on
this backend): expected deltas = hard zone edges unless feather requested,
Local2D bubble now composites by alpha over weave inside zones.

Refs #800, #801, #803.

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