Skip to content
Snippets Groups Projects
Commit 7a221263 authored by Leonie Franken's avatar Leonie Franken
Browse files

[#111] Fixed vanishing particles

parent 6846c6db
No related branches found
No related tags found
1 merge request!95Resolve "Wassersimulation mit Interaktion"
Pipeline #27245 passed
......@@ -4,7 +4,7 @@
const float PI = 3.1415926535897932384626433832795;
#define h 0.045
#define gravity 9.81
#define gravity -9.81
#define mass 0.1
#define viscosity 1500
......
......@@ -59,7 +59,7 @@ void main() {
densitySum += mass * poly6(dist);
}
}
outParticle[id].density = densitySum;
outParticle[id].density = max(densitySum, 0.001f);
outParticle[id].pressure = max((densitySum - offset), 0) * gasConstant;
outParticle[id].position = inParticle[id].position;
outParticle[id].velocity = inParticle[id].velocity;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment