Merge pull request #585 from tntljc/master

Fix some synchronization flaws
This commit is contained in:
Sascha Willems 2019-06-22 10:00:09 +02:00 committed by GitHub
commit 2a5d7df56e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 17 deletions

View file

@ -62,6 +62,9 @@ void main()
vec3 len = other.xyz - position.xyz;
acceleration.xyz += GRAVITY * len * other.w / pow(dot(len, len) + SOFTEN, POWER);
}
memoryBarrierShared();
barrier();
}
particles[index].vel.xyz += ubo.deltaT * acceleration.xyz;