flare-slang/shader/hello-world.slang
2025-01-04 16:51:07 -05:00

16 lines
336 B
Plaintext

StructuredBuffer<float> buffer0;
StructuredBuffer<float> buffer1;
RWStructuredBuffer<float> result;
import rng;
[shader("compute")]
[numthreads(1,1,1)]
void computeMain(uint3 threadId : SV_DispatchThreadID)
{
Xoroshiro128Plus generator = {1, 2};
for (var i = 0; i < 10; i++)
{
result[i] = generator.next();
}
}