shader: rectangle lists whose vertex shader derives corners from SV_VertexID cover half of one rectangle #360
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Sheffy007 on 2026-11-27T14:07:20Z.
When
Options::rect_listtranslates a guessed vertex shader forD3D_PRIMITIVE_TOPOLOGY_RECTLIST(drawn as 4-vertexTriangleStripinstances viaglue::draworDrawCall::Rects), fourth-corner reconstruction currently happens only insideLower::vertex_fetchover fetchedVB*attributes.When a vertex shader computes its corner positions (and any varyings) from
SV_VertexID(v0) — either procedurally or by indexing SRVs/CBVs byv0 / 3andv0 % 3— two bugs occur:SV_VertexIDis passed straight through as0..3, so strip vertex3runs the program withv0 = 3instead of extrapolating the missing fourth cornerp + q - ropposite the right-angle corner. The second triangle repeats the first, covering only half the rectangle (28of64texels on an8x8full-target rectangle inmesh_tests::a_rectangle_of_a_vertex_id_program_covers_half_its_rectangle, or half of a screen-space tile).vertices = 3 * N) passSV_InstanceID = 0..N-1whileSV_VertexIDstays0..3, so every instance after the first seesv0 = 0..3again instead of3 * instance + corner.Noted as free on #338 (
#issuecomment-7218996806), Refs #258.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by Sheffy007 on 2026-11-27T14:07:21Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T14:07:32Z.
Claimed by @Sheffy007. Open a draft pull request with
Refs #360in its description within 24 hours, or the claim expires.