diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-07-22 22:30:49 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-07-22 22:30:49 +0200 |
commit | 50b86d35e9c8c9946746df5a2692d561ddacceaf (patch) | |
tree | 31fc1d8527257e758126a01d4ff54a25913f8d27 | |
parent | d0d43e9ccc4fbb6aeaa36c62c29e714e58f61bec (diff) |
Fix floating point types in swirlytron.frag
-rw-r--r-- | data/shaders/swirlytron.frag | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/shaders/swirlytron.frag b/data/shaders/swirlytron.frag index 7d8aaec..c2d6700 100644 --- a/data/shaders/swirlytron.frag +++ b/data/shaders/swirlytron.frag @@ -21,7 +21,7 @@ void main() { colour.r = 0.0; colour.g = 0.0; - colour.b = 0.5*max(0.0, cos(2*3.141*coords.x-(time/250.0))) + 0.5*max(0.0, cos(2*3.141*coords.y-(time/250.0))); + colour.b = 0.5*max(0.0, cos(2.0*3.141*coords.x-(time/250.0))) + 0.5*max(0.0, cos(2.0*3.141*coords.y-(time/250.0))); if ( rechargeripple ) { @@ -30,8 +30,8 @@ void main() { r = pow(abs(incoords.x), 2.0) + pow(abs(incoords.y), 2.0); - colour.r += rrb * 0.8 * cos(2*f*3.141*r + (time/250.0) ); - colour.g += rrb * 0.3 * cos(2*f*3.141*r + (time/250.0) ); + colour.r += rrb * 0.8 * cos(2.0*f*3.141*r + (time/250.0) ); + colour.g += rrb * 0.3 * cos(2.0*f*3.141*r + (time/250.0) ); colour.b += rrb * 0.1; } |