• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1struct sb_t
2{
3    float4 color;
4    uint2  threadId;
5};
6
7RWTexture2D<float4> outtx;
8ConsumeStructuredBuffer<sb_t> csb : register(u1);
9RWStructuredBuffer<float4> rwsb;
10
11[numthreads(1, 1, 1)]
12void main(uint3 nThreadId : SV_DispatchThreadID)
13{
14    sb_t data = csb.Consume();
15    float2 coord = float2(data.threadId.xy);
16    outtx[coord] = data.color;
17
18    rwsb[coord.x] = rwsb.Load(coord.y);
19}
20