Skip to content
Snippets Groups Projects
Verified Commit ebcf0ca2 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Fixed barriers in sph simulation

parent d74f8366
No related branches found
No related tags found
1 merge request!103Added project wobble_bobble and refactored some parts of the framework
......@@ -80,6 +80,7 @@ void main() {
particle_data[gl_LocalInvocationIndex].pressure = inParticle[id].pressure;
memoryBarrierShared();
barrier();
const float h6 = pow(h, 6);
externalForce = particle_data[gl_LocalInvocationIndex].density * gravity * vec3(-gravityDir.x,gravityDir.y,gravityDir.z);
......
......@@ -63,6 +63,7 @@ void main() {
position_data[gl_LocalInvocationIndex] = inParticle[id].position;
memoryBarrierShared();
barrier();
for(uint j = 1; j < gl_WorkGroupSize.x; j++) {
uint i = (gl_LocalInvocationIndex + j) % gl_WorkGroupSize.x;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment