diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-10-30 10:15:46 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-10-30 10:15:46 -0400 |
| commit | efbb3e5c5315523ab55c7b856785e54db7eaf604 (patch) | |
| tree | c8d8481485a32f72ba4efd82d5b9abca0a820e06 /balls.cl | |
| parent | 8135cb3419b9fbe5f1c725ae05bc1d8f8dc1219e (diff) | |
| download | balls-efbb3e5c5315523ab55c7b856785e54db7eaf604.zip | |
collideBalls(): fix ball index array addressing
Diffstat (limited to 'balls.cl')
| -rw-r--r-- | balls.cl | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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]; |