summaryrefslogtreecommitdiff
path: root/examples/reflection-api/compute-simple.slang
diff options
context:
space:
mode:
Diffstat (limited to 'examples/reflection-api/compute-simple.slang')
-rw-r--r--examples/reflection-api/compute-simple.slang21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/reflection-api/compute-simple.slang b/examples/reflection-api/compute-simple.slang
new file mode 100644
index 000000000..3d8872180
--- /dev/null
+++ b/examples/reflection-api/compute-simple.slang
@@ -0,0 +1,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 */
+}