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

Removed branch in sph update shader to fix hanging particles

parent d38defae
No related branches found
No related tags found
No related merge requests found
...@@ -53,14 +53,6 @@ void main() { ...@@ -53,14 +53,6 @@ void main() {
vec3 out_force = inParticle[id].force; vec3 out_force = inParticle[id].force;
float out_density = inParticle[id].density; float out_density = inParticle[id].density;
float out_pressure = inParticle[id].pressure; float out_pressure = inParticle[id].pressure;
if (length(vel_new) > 100.f)
{
vel_new = normalize(vel_new)*50;
out_density = 0.01f;
out_pressure = 0.01f;
out_force = gravity * vec3(-gravityDir.x,gravityDir.y,gravityDir.z);
}
vec3 pos_new = inParticle[id].position + (dt * vel_new); vec3 pos_new = inParticle[id].position + (dt * vel_new);
......
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