blob: 00d45d857bde82bbe7d3e8ea794c0a52c7f0e014 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// compute-simple.slang
static const uint THREADGROUP_SIZE_X = 8;
static const uint THREADGROUP_SIZE_Y = THREADGROUP_SIZE_X;
struct ImageProcessingOptions
{
float3 tintColor;
float blurRadius;
bool useLookupTable;
StructuredBuffer<float4> lookupTable;
}
[shader("compute")]
[numthreads(THREADGROUP_SIZE_X, THREADGROUP_SIZE_Y)]
void processImage(
uint3 threadID : SV_DispatchThreadID,
uniform Texture2D inputImage,
uniform RWTexture2D outputImage,
uniform ImageProcessingOptions options)
{
/* actual logic would go here */
}
|