From d290dcd50821308a08aed4b1bcd6087e16b0c1ed Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 28 Apr 2019 20:41:07 +0200 Subject: More consistent restrictions of display values --- src/shader/code/extra.glsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/shader/code/extra.glsl') 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); } -- cgit v1.2.3