summaryrefslogtreecommitdiffstats
path: root/balls.cl
diff options
context:
space:
mode:
Diffstat (limited to 'balls.cl')
-rw-r--r--balls.cl4
1 files changed, 2 insertions, 2 deletions
diff --git a/balls.cl b/balls.cl
index 05a223b..bca7686 100644
--- a/balls.cl
+++ b/balls.cl
@@ -65,8 +65,8 @@ collideBalls(
float r1, r2, m1, m2;
id = get_global_id(0);
- i1 = ballIndices[id];
- i2 = ballIndices[id+1];
+ i1 = ballIndices[2*id];
+ i2 = ballIndices[2*id+1];
p1 = positions[i1];
p2 = positions[i2];