aboutsummaryrefslogtreecommitdiff
path: root/src/shader/code/extra.glsl
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-04-28 20:41:07 +0200
committerAdrian Kummerlaender2019-04-28 20:41:07 +0200
commitd290dcd50821308a08aed4b1bcd6087e16b0c1ed (patch)
tree0cf975057e20031f9a5f1d7ec513fc624ca15443 /src/shader/code/extra.glsl
parentecaf665a05bdfcd10937152c378cfaec7cdf1836 (diff)
downloadcompustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.tar
compustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.tar.gz
compustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.tar.bz2
compustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.tar.lz
compustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.tar.xz
compustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.tar.zst
compustream-d290dcd50821308a08aed4b1bcd6087e16b0c1ed.zip
More consistent restrictions of display values
Diffstat (limited to 'src/shader/code/extra.glsl')
-rw-r--r--src/shader/code/extra.glsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shader/code/extra.glsl b/src/shader/code/extra.glsl
index 5ba6207..3fec976 100644
--- a/src/shader/code/extra.glsl
+++ b/src/shader/code/extra.glsl
@@ -45,8 +45,10 @@ void main() {
}
// simple central difference discretization of the 2d curl operator
- const float dxvy = (getFluidVelocity(x+1,y).y - getFluidVelocity(x-1,y).y) / (2*convLength);
- const float dyvx = (getFluidVelocity(x,y+1).x - getFluidVelocity(x,y-1).x) / (2*convLength);
+ const float dxvy = (getFluidVelocity(x+1,y).y - getFluidVelocity(x-1,y).y)
+ / (2*convLength);
+ const float dyvx = (getFluidVelocity(x,y+1).x - getFluidVelocity(x,y-1).x)
+ / (2*convLength);
setFluidExtra(x, y, dxvy - dyvx);
}