15 行
414 B
C#
15 行
414 B
C#
namespace ComputeSharp.Sample.FSharp.Shaders;
|
|
|
|
/// <summary>
|
|
/// A sample shader thaat just multiplies items in a buffer by two.
|
|
/// </summary>
|
|
[ThreadGroupSize(DefaultThreadGroupSizes.X)]
|
|
[GeneratedComputeShaderDescriptor]
|
|
public readonly partial struct MultiplyByTwo(ReadWriteBuffer<float> buffer) : IComputeShader
|
|
{
|
|
/// <inheritdoc/>
|
|
public void Execute()
|
|
{
|
|
buffer[ThreadIds.X] *= 2;
|
|
}
|
|
} |