aboutsummaryrefslogtreecommitdiff
path: root/src/shader/code
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-04-18 22:15:39 +0200
committerAdrian Kummerlaender2019-04-18 22:15:39 +0200
commit34566b28a82869cbf004d91c6d658ba71d40ed97 (patch)
tree5322ec9bf7f48a96390d638d410aff0abfe21348 /src/shader/code
parent1ad4daa0289c56e3d6b896d5037002aa6b461674 (diff)
downloadcompustream-34566b28a82869cbf004d91c6d658ba71d40ed97.tar
compustream-34566b28a82869cbf004d91c6d658ba71d40ed97.tar.gz
compustream-34566b28a82869cbf004d91c6d658ba71d40ed97.tar.bz2
compustream-34566b28a82869cbf004d91c6d658ba71d40ed97.tar.lz
compustream-34566b28a82869cbf004d91c6d658ba71d40ed97.tar.xz
compustream-34566b28a82869cbf004d91c6d658ba71d40ed97.tar.zst
compustream-34566b28a82869cbf004d91c6d658ba71d40ed97.zip
Bind key to reset lattice buffers
i.e. restarting the simulation without clearing the geometry
Diffstat (limited to 'src/shader/code')
-rw-r--r--src/shader/code/collide.glsl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/shader/code/collide.glsl b/src/shader/code/collide.glsl
index d877634..e2c3212 100644
--- a/src/shader/code/collide.glsl
+++ b/src/shader/code/collide.glsl
@@ -13,13 +13,6 @@ uniform uint iT;
uniform bool show_fluid_quality;
-/// Fluid characteristics
-
-const float physCharLength = 1.0;
-const float physCharVelocity = 1.0;
-const float physViscosity = 0.01;
-const float latticeCharVelocity = 0.01;
-
/// LBM constants
const uint q = 9;
@@ -30,6 +23,13 @@ const float weight[q] = float[](
);
const float invCs2 = 1./3.;
+/// Fluid characteristics
+
+const float physCharLength = 1.0;
+const float physCharVelocity = 1.0;
+const float physViscosity = 0.01;
+const float latticeCharVelocity = 0.1;
+
/// Unit conversion
const float resolution = max(nX,nY);