From c19cffcae57ff68d99eaa38f6d0547942dce5eca Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 12 Feb 2017 20:31:13 +1300 Subject: Remove more hardcoded crap --- test.cl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test.cl') diff --git a/test.cl b/test.cl index a2ecc67..2652108 100644 --- a/test.cl +++ b/test.cl @@ -11,8 +11,7 @@ __kernel void fractal_gen( float b = -1.75+(((float)y)/(float)size)*3.5; float2 z = (0.0, 0.0); - - + for (i = 0; i < iterations; i++) { // if abs(z) > 2 if (z.x*z.x + z.y*z.y > 4) @@ -22,5 +21,5 @@ __kernel void fractal_gen( z.x = z.x*z.x - z.y*z.y + a; z.y = 2*oldx*z.y + b; } - buffer[x+size*y] = (i*255)/iterations; + buffer[(size*y)+x] = (i*255)/iterations; } -- cgit v1.1