Joshua Moerman
14 years ago
6 changed files with 48 additions and 36 deletions
@ -1,12 +1,20 @@ |
|||
uniform sampler2D tex; |
|||
uniform vec2 offset; |
|||
uniform float inter; |
|||
uniform float fade; |
|||
|
|||
vec2 offset = vec2(0.0, 1.0/600.0); |
|||
//vec2 offset = vec2(0.0, 1.0/600.0); |
|||
//float inter = 0.2; |
|||
|
|||
void main( void ) { |
|||
gl_FragColor = texture2D(tex, gl_TexCoord[0].st + offset); |
|||
gl_FragColor += texture2D(tex, gl_TexCoord[0].st - offset); |
|||
gl_FragColor = normalize(gl_FragColor) + 0.5*gl_FragColor; |
|||
gl_FragColor *= 0.56; |
|||
gl_FragColor = inter*normalize(gl_FragColor) + (1.0 - inter)*gl_FragColor; |
|||
gl_FragColor *= fade; |
|||
//gl_FragColor = sin(gl_FragColor*3.0); |
|||
|
|||
gl_FragColor -= 0.033*texture2D(tex, gl_TexCoord[0].st + 30.0*offset); |
|||
gl_FragColor -= 0.033*texture2D(tex, gl_TexCoord[0].st - 30.0*offset); |
|||
|
|||
gl_FragColor.a = 1.0; |
|||
} |
|||
|
@ -1,12 +1,13 @@ |
|||
uniform sampler2D tex; |
|||
|
|||
vec2 offset = vec2(1.0/800.0, 0.0); |
|||
float inter = 0.2; |
|||
|
|||
void main( void ) { |
|||
gl_FragColor = texture2D(tex, gl_TexCoord[0].st + offset); |
|||
gl_FragColor += texture2D(tex, gl_TexCoord[0].st - offset); |
|||
gl_FragColor = normalize(gl_FragColor) + 0.5*gl_FragColor; |
|||
gl_FragColor *= 0.56; |
|||
gl_FragColor = inter*normalize(gl_FragColor) + (1.0 - inter)*gl_FragColor; |
|||
gl_FragColor *= 0.57; |
|||
//gl_FragColor = sin(gl_FragColor*3.0); |
|||
gl_FragColor.a = 1.0; |
|||
} |
|||
|
Reference in new issue