summaryrefslogtreecommitdiff
path: root/src/cl
diff options
context:
space:
mode:
authorAiden Gall <aiden@aidengall.xyz>2024-02-04 14:43:37 +0000
committerAiden Gall <aiden@aidengall.xyz>2024-02-04 14:46:37 +0000
commitc44d2805ba480fc7c2faf8ae07f2c1c9febf7e34 (patch)
tree0171574e51da53dbe2664360949cc78259b2da0b /src/cl
parent5ff9d6184771970c14e682ecf55cbd9d27b2fada (diff)
render with raylib
Diffstat (limited to 'src/cl')
-rw-r--r--src/cl/spirt.cl10
1 files changed, 5 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>. */
__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;
}