https://github.com/shader-slang/slang
Raw File
Tip revision: c754c0b4b91634196fd2bec8d5622bde8cccaf98 authored by Yong He on 06 September 2023, 05:10:20 UTC
Fix HLSL SER Intrinsics. (#3183)
Tip revision: c754c0b
hello-world.slang
// hello-world.slang
StructuredBuffer<float> buffer0;
StructuredBuffer<float> buffer1;
RWStructuredBuffer<float> result;

[shader("compute")]
[numthreads(1,1,1)]
void computeMain(uint3 threadId : SV_DispatchThreadID)
{
    uint index = threadId.x;
    result[index] = buffer0[index] + buffer1[index];
}
back to top