summaryrefslogtreecommitdiffstats
path: root/examples/reflection-api/compute-simple.slang
blob: 3d88721805bcec405d6311583992c75992cd70fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// compute-simple.slang

struct ImageProcessingOptions
{
    float3 tintColor;
    float blurRadius;

    bool useLookupTable;
    StructuredBuffer<float4> lookupTable;
}

[shader("compute")]
[numthreads(8, 8)]
void processImage(
    uint3 threadID : SV_DispatchThreadID,
    uniform Texture2D inputImage,
    uniform RWTexture2D outputImage,
    uniform ImageProcessingOptions options)
{
    /* actual logic would go here */
}