summaryrefslogtreecommitdiffstats
path: root/balls.cl
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-10-26 18:50:45 -0400
committerSam Anthony <sam@samanthony.xyz>2024-10-26 18:50:45 -0400
commitda60f356e3c6404672cbc35b85b309d21fca896e (patch)
tree6a3047ea3890948763d4afbf352cefed413aaab8 /balls.cl
parent2e8af6099010dc3b525cfd6517b8754bca9e99b9 (diff)
downloadballs-da60f356e3c6404672cbc35b85b309d21fca896e.zip
dummy opencl kernel
Diffstat (limited to 'balls.cl')
-rw-r--r--balls.cl29
1 files changed, 29 insertions, 0 deletions
diff --git a/balls.cl b/balls.cl
new file mode 100644
index 0000000..5ed8ab7
--- /dev/null
+++ b/balls.cl
@@ -0,0 +1,29 @@
+__kernel void
+balls(__global float4 *coords1, __global float4 *colors1,
+ __global float4 *coords2, __global float4 *colors2,
+ __global float4 *coords3, __global float4 *colors3
+) {
+ coords1[0] = (float4)(-0.15f, -0.15f, 1.00f, -0.15f);
+ coords1[1] = (float4)( 0.15f, 1.00f, 0.15f, 0.15f);
+ coords1[2] = (float4)( 1.00f, 0.15f, -0.15f, 1.00f);
+
+ colors1[0] = (float4)(0.00f, 0.00f, 0.00f, 0.25f);
+ colors1[1] = (float4)(0.00f, 0.00f, 0.50f, 0.00f);
+ colors1[2] = (float4)(0.00f, 0.75f, 0.00f, 0.00f);
+
+ coords2[0] = (float4)(-0.30f, -0.30f, 0.00f, -0.30f);
+ coords2[1] = (float4)( 0.30f, 0.00f, 0.30f, 0.30f);
+ coords2[2] = (float4)( 0.00f, 0.30f, -0.30f, 0.00f);
+
+ colors2[0] = (float4)(0.00f, 0.00f, 0.00f, 0.00f);
+ colors2[1] = (float4)(0.25f, 0.00f, 0.00f, 0.50f);
+ colors2[2] = (float4)(0.00f, 0.00f, 0.75f, 0.00f);
+
+ coords3[0] = (float4)(-0.45f, -0.45f, -1.00f, -0.45f);
+ coords3[1] = (float4)( 0.45f, -1.00f, 0.45f, 0.45f);
+ coords3[2] = (float4)(-1.00f, 0.45f, -0.45f, -1.00f);
+
+ colors3[0] = (float4)(0.00f, 0.00f, 0.00f, 0.00f);
+ colors3[1] = (float4)(0.00f, 0.25f, 0.00f, 0.00f);
+ colors3[2] = (float4)(0.50f, 0.00f, 0.00f, 0.75f);
+}