summaryrefslogtreecommitdiff
path: root/src/cl
diff options
context:
space:
mode:
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;
}