aboutsummaryrefslogtreecommitdiff
path: root/src/shader/code/collide.glsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-04-24 22:37:49 +0200
committerAdrian Kummerlaender2019-04-24 22:37:49 +0200
commit15f33fd09cffe05e82f5a1008cbfc2b2b12c8187 (patch)
tree8671c3d1e1237b10210038d8e11a8ac50a139fab /src/shader/code/collide.glsl
parent34566b28a82869cbf004d91c6d658ba71d40ed97 (diff)
downloadcompustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.tar
compustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.tar.gz
compustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.tar.bz2
compustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.tar.lz
compustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.tar.xz
compustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.tar.zst
compustream-15f33fd09cffe05e82f5a1008cbfc2b2b12c8187.zip
Add support for erasing walls
Diffstat (limited to 'src/shader/code/collide.glsl')
-rw-r--r--src/shader/code/collide.glsl12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/shader/code/collide.glsl b/src/shader/code/collide.glsl
index e2c3212..191204e 100644
--- a/src/shader/code/collide.glsl
+++ b/src/shader/code/collide.glsl
@@ -28,7 +28,7 @@ const float invCs2 = 1./3.;
const float physCharLength = 1.0;
const float physCharVelocity = 1.0;
const float physViscosity = 0.01;
-const float latticeCharVelocity = 0.1;
+const float latticeCharVelocity = 0.005;
/// Unit conversion
@@ -148,14 +148,6 @@ bool isOutflowCell(int material) {
return material == 6;
}
-float getExternalMassInflux(int material) {
- if ( material == 4 ) {
- return 1.5;
- } else {
- return 0.0;
- }
-};
-
float getLocalKnudsenApproximation(uint x, uint y, float d, vec2 v) {
float knudsen = 0.0;
@@ -182,7 +174,7 @@ void main() {
const int material = getMaterial(x,y);
- float d = max(density(x,y), getExternalMassInflux(material));
+ float d = density(x,y);
vec2 v = velocity(x,y,d);
if ( isBulkFluidCell(material) ) {