From c44d2805ba480fc7c2faf8ae07f2c1c9febf7e34 Mon Sep 17 00:00:00 2001 From: Aiden Gall Date: Sun, 4 Feb 2024 14:43:37 +0000 Subject: render with raylib --- src/cl/spirt.cl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cl') diff --git a/src/cl/spirt.cl b/src/cl/spirt.cl index 300f552..12022bb 100644 --- a/src/cl/spirt.cl +++ b/src/cl/spirt.cl @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ __kernel void -hello(__global ushort *const canvas) +hello(__global unsigned char *const canvas) { size_t idx, w, h, i, j; @@ -26,8 +26,8 @@ hello(__global ushort *const canvas) idx = (w * j + i) * 4; - canvas[idx] = (ushort)((65535 * i) / (w - 1)); - canvas[idx + 1] = (ushort)((65535 * j) / (h - 1)); - canvas[idx + 2] = 16383; - canvas[idx + 3] = 65535; + canvas[idx] = (unsigned char)((255 * i) / (w - 1)); + canvas[idx + 1] = (unsigned char)((255 * j) / (h - 1)); + canvas[idx + 2] = 63; + canvas[idx + 3] = 255; } -- cgit v1.2.3