aboutsummaryrefslogtreecommitdiff
path: root/src/shader/code/collide.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader/code/collide.glsl')
-rw-r--r--src/shader/code/collide.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shader/code/collide.glsl b/src/shader/code/collide.glsl
index 45e06f8..d3d004d 100644
--- a/src/shader/code/collide.glsl
+++ b/src/shader/code/collide.glsl
@@ -34,7 +34,7 @@ const float relaxationFrequency = 1 / relaxationTime;
/// Unit conversion
-const float convLength = physCharLength / nX;
+const float convLength = physCharLength / max(nX,nY);
const float convTime = (relaxationTime - 0.5) / invCs2 * convLength*convLength / physViscosity;
const float convVelocity = convLength / convTime;
const float convViscosity = convLength * convLength / convTime;