yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
2886bc35e
master
1// hello-world.slang 2StructuredBuffer<float> buffer0; 3StructuredBuffer<float> buffer1; 4RWStructuredBuffer<float> result; 5 6[shader("compute")] 7[numthreads(1,1,1)] 8void computeMain(uint3 threadId : SV_DispatchThreadID) 9{ 10 uint index = threadId.x; 11 result[index] = buffer0[index] + buffer1[index]; 12}