1RWTexture2D<uint> Values;
2
3struct InputStruct {
4 float4 Position : SV_POSITION;
5};
6
7[earlydepthstencil]
8uint main(InputStruct input) : SV_Target {
9 uint oldVal;
10 InterlockedExchange(Values[uint2(input.Position.x, input.Position.y)], 1.0, oldVal);
11 return oldVal;
12}
13