1 2ByteAddressBuffer sbuf; 3 4float4 main(uint pos : FOO) : SV_Target0 5{ 6 uint size; 7 sbuf.GetDimensions(size); 8 9 return sbuf.Load(pos) + 10 float4(sbuf.Load2(pos+4), 0, 0) + 11 float4(sbuf.Load3(pos+8), 0) + 12 sbuf.Load4(pos+12); 13} 14
1 2ByteAddressBuffer sbuf; 3 4float4 main(uint pos : FOO) : SV_Target0 5{ 6 uint size; 7 sbuf.GetDimensions(size); 8 9 return sbuf.Load(pos) + 10 float4(sbuf.Load2(pos+4), 0, 0) + 11 float4(sbuf.Load3(pos+8), 0) + 12 sbuf.Load4(pos+12); 13} 14