flare-slang/shader/hello-world.slang

16 lines
336 B
Plaintext
Raw Permalink Normal View History

2025-01-01 17:32:11 -05:00
StructuredBuffer<float> buffer0;
StructuredBuffer<float> buffer1;
RWStructuredBuffer<float> result;
2025-01-04 16:51:07 -05:00
import rng;
2025-01-01 17:32:11 -05:00
[shader("compute")]
[numthreads(1,1,1)]
void computeMain(uint3 threadId : SV_DispatchThreadID)
{
2025-01-04 16:51:07 -05:00
Xoroshiro128Plus generator = {1, 2};
for (var i = 0; i < 10; i++)
{
result[i] = generator.next();
}
}