aboutsummaryrefslogtreecommitdiff
path: root/samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2012-02-19 17:46:50 +0100
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2012-02-19 17:46:50 +0100
commitadfa666208bbf720e0dd33602661384b146e5268 (patch)
tree79de8d74180f18948735a60aa6637a9f40c285f8 /samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c
parenteeb1931d2d214b28e4117ad17824ece40f865511 (diff)
downloadcodesamples-adfa666208bbf720e0dd33602661384b146e5268.tar.gz
codesamples-adfa666208bbf720e0dd33602661384b146e5268.tar.bz2
FBO example added
Diffstat (limited to 'samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c')
-rw-r--r--samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c b/samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c
index 7742746..437dd92 100644
--- a/samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c
+++ b/samples/OpenGL/texture_distortion_glsl/texture_distortion_glsl.c
@@ -43,7 +43,7 @@ static const GLchar *fragment_shader_source =
" float ts = gl_TexCoord[0].s;\n"
" vec2 mod_texcoord = gl_TexCoord[0].st*vec2(1., 2.) + vec2(0, -0.5 + 0.5*sin(T + 1.5*ts*pi));\n"
" if( mod_texcoord.t < 0. || mod_texcoord.t > 1. ) { discard; }\n"
-" gl_FragColor = -texture2D(texCMYK, mod_texcoord) + texture2D(texRGB, gl_TexCoord[0].st);\n"
+" gl_FragColor.rgb = -texture2D(texCMYK, mod_texcoord).xyz + texture2D(texRGB, gl_TexCoord[0].st).xyz;\n"
"}\n\0";
GLuint shaderFragment = 0;