The lanes in a quad are typically ordered as follows:
A common use case is optimizing texture fetches. Instead of every thread sampling a texture (which is bandwidth heavy), you can have only two threads perform the fetch and share the result, or share weights calculated by a neighbor.
// Let's say Thread A has uv.x = 0.5, Thread B has uv.x = 0.6 quadreadacrossx
quadReadAcrossX is a data-swizzling operation that allows a shader thread to instantly see the data of the pixel immediately to its left or right within the current $2 \times 2$ execution group.
: Creating mipmaps or performing reduction operations (like finding the average color of a group) becomes much faster when threads can directly "talk" to their neighbours. Related Functions QuadReadAcrossX is part of a family of "Quad" intrinsics that allow movement in different directions within the 2x2 grid: QuadReadAcrossY : Reads from the vertical neighbour. QuadReadAcrossDiagonal : Reads from the diagonally opposite thread. QuadReadLaneAt : Reads from a specific index (0–3) within the quad. Microsoft Learn +2 Further Exploration Read the The lanes in a quad are typically ordered
// Read the UV from the horizontal neighbor float2 neighborUV = quadReadAcrossX(uv);
float4 main(float2 uv : TEXCOORD) : SV_Target : Creating mipmaps or performing reduction operations (like
— Perhaps you meant one of these:
In modern graphics pipelines, GPUs process pixels in small 2x2 clusters known as . Within each quad, lanes (threads) are typically indexed from 0 to 3 in a Z-order scanline pattern: Lane 0 (Top-Left) swaps with Lane 1 (Top-Right). Lane 2 (Bottom-Left) swaps with Lane 3 (Bottom-Right).
<type> quadReadAcrossX(<type> localValue);