diff options
| author | victorfisac <[email protected]> | 2016-02-26 14:32:30 +0100 |
|---|---|---|
| committer | victorfisac <[email protected]> | 2016-02-26 14:32:30 +0100 |
| commit | ce56fcb1eda06385b88c1a906f0968d742ff8130 (patch) | |
| tree | 4c82fa8ce61db1ae4af3ab1e174dd8c7d5918919 /shaders/gl330/scanlines.fs | |
| parent | f582ab06add085594f2579ee6e7d625212abd204 (diff) | |
| parent | 75a73d94171051037fcf670852877977d9251520 (diff) | |
| download | raylib-ce56fcb1eda06385b88c1a906f0968d742ff8130.tar.gz raylib-ce56fcb1eda06385b88c1a906f0968d742ff8130.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/master'
Diffstat (limited to 'shaders/gl330/scanlines.fs')
| -rw-r--r-- | shaders/gl330/scanlines.fs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shaders/gl330/scanlines.fs b/shaders/gl330/scanlines.fs index 7f33f882..0c89e610 100644 --- a/shaders/gl330/scanlines.fs +++ b/shaders/gl330/scanlines.fs @@ -5,12 +5,12 @@ in vec2 fragTexCoord; out vec4 fragColor; uniform sampler2D texture0; -uniform vec4 tintColor; +uniform vec4 fragTintColor; // NOTE: Add here your custom variables -float offset = 0; -float frequency = 720/3.0; +float offset = 0.0; +float frequency = 720.0/3.0; uniform float time; @@ -21,7 +21,7 @@ void main (void) float tval = 0; //time vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); - vec4 color = texture2D(texture0, fragTexCoord); + vec4 color = texture(texture0, fragTexCoord); color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); @@ -35,7 +35,7 @@ void main (void) float globalPos = (fragTexCoord.y + offset) * frequency; float wavePos = cos((fract(globalPos) - 0.5)*3.14); - vec4 color = texture2D(texture0, fragTexCoord); + vec4 color = texture(texture0, fragTexCoord); - fragColor = mix(vec4(0, 0.3, 0, 0), color, wavePos); + fragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); }
\ No newline at end of file |
