WaveReadLaneAt function
Returns the value of the expression for the given lane index within the specified wave.
Syntax
<type> WaveReadLaneAt(
<type> expr,
uint laneIndex
);
Parameters
-
expr
-
The expression to evaluate.
-
laneIndex
-
The index of the lane for which the expr result will be returned.
Return value
The resulting value is the result of expr. It will be uniform if laneIndex is uniform.
Remarks
If laneIndex is uniform, then this is effectively a broadcast operation; otherwise, it's a shuffle operation.
The result is undefined on a helper lane, or if the lane referred to by laneIndex is inactive or a helper lane.
This function is supported from shader model 6.0 in all shader stages.