blob: 4c1f0ac3efd427caa6c7238bff52525699cc2e6e [file] [edit]
RWStructuredBuffer<uint> RWBuf : register(u0);
struct InputRecord
{
uint3 grid : SV_DispatchGrid;
};
[Shader("node")]
[NodeLaunch("broadcasting")]
[NodeMaxDispatchGrid(2, 2, 2)]
[NumThreads(2, 3, 4)]
void BroadcastNode(DispatchNodeInputRecord<InputRecord> input, uint3 thr : SV_DispatchThreadID)
{
uint idx = thr.z * 100 + thr.y * 10 + thr.x;
uint o;
InterlockedAdd(RWBuf[idx], 1, o);
}