aboutsummaryrefslogtreecommitdiff
path: root/test.cl
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-02-12 20:31:13 +1300
committerDavid Phillips <david@sighup.nz>2017-02-12 20:31:13 +1300
commitc19cffcae57ff68d99eaa38f6d0547942dce5eca (patch)
treed549d1bc78a6b1481ff3ce9ee6c8e2a97c785f21 /test.cl
parentc8dc778d855b05a057e8d340b06900ba738811df (diff)
downloadfractal-gen-opencl-c19cffcae57ff68d99eaa38f6d0547942dce5eca.tar.xz
Remove more hardcoded crap
Diffstat (limited to 'test.cl')
-rw-r--r--test.cl5
1 files changed, 2 insertions, 3 deletions
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;
}