Load an initial module
This commit is contained in:
12
resources/test-entry/compute_hello-world.slang
Normal file
12
resources/test-entry/compute_hello-world.slang
Normal file
@ -0,0 +1,12 @@
|
||||
// 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];
|
||||
}
|
Reference in New Issue
Block a user