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

Fixed update of velocities

parent 8ad08b51
Branches
Tags
1 merge request!103Added project wobble_bobble and refactored some parts of the framework
...@@ -24,6 +24,8 @@ void main() { ...@@ -24,6 +24,8 @@ void main() {
vec3 gridVelocity = gridSample.xyz; vec3 gridVelocity = gridSample.xyz;
float gridMass = gridSample.w; float gridMass = gridSample.w;
particles[gl_GlobalInvocationID.x].minimal.velocity = gridVelocity * mass / gridMass; if (gridMass > 0.0f) {
particles[gl_GlobalInvocationID.x].minimal.velocity = gridVelocity * mass / gridMass;
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment