yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeAdd Hello world example. (#1797)2886bc35e

master
303 B12 linesraw
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}