diff options
author | Adrian Kummerlaender | 2019-02-27 21:39:48 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2019-02-27 21:39:59 +0100 |
commit | 89718b245b0246e08f9d0545a636e0cf89642a72 (patch) | |
tree | e30dce94b1941e47bab1cbc5987da81bee407e2b | |
parent | 72cc7c54d0feb842f4fe07ce55c50f50b706c2f0 (diff) | |
download | compustream-89718b245b0246e08f9d0545a636e0cf89642a72.tar compustream-89718b245b0246e08f9d0545a636e0cf89642a72.tar.gz compustream-89718b245b0246e08f9d0545a636e0cf89642a72.tar.bz2 compustream-89718b245b0246e08f9d0545a636e0cf89642a72.tar.lz compustream-89718b245b0246e08f9d0545a636e0cf89642a72.tar.xz compustream-89718b245b0246e08f9d0545a636e0cf89642a72.tar.zst compustream-89718b245b0246e08f9d0545a636e0cf89642a72.zip |
Test density inflow condition
Seems to be more stable when drawing around.
Not that all of this doesn't aim to be accurate in any real world sense.
-rw-r--r-- | src/shader/code/collide.glsl | 2 | ||||
-rw-r--r-- | src/shader/code/vertex.glsl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shader/code/collide.glsl b/src/shader/code/collide.glsl index 8755a3d..3bfd332 100644 --- a/src/shader/code/collide.glsl +++ b/src/shader/code/collide.glsl @@ -143,7 +143,7 @@ void main() { if ( isBulkFluidCell(material) ) { if ( isInflowCell(material) ) { - v = vec2(min(float(iT)*0.2/2000.0, 0.2), 0.0); + d = min(1.0+float(iT)*0.2/1000.0, 1.2); } if ( isOutflowCell(material) ) { d = 1.0; diff --git a/src/shader/code/vertex.glsl b/src/shader/code/vertex.glsl index 67a5d80..676b68e 100644 --- a/src/shader/code/vertex.glsl +++ b/src/shader/code/vertex.glsl @@ -10,7 +10,7 @@ out VS_OUT { uniform uint nX; uniform uint nY; -const float displayAmplifier = 4.0; +const float displayAmplifier = 3.0; float unit(float x) { return 1.0/(1.0+exp(-x)); |