summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst-libs/gst/gl/gstgldisplay.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index 0445cbf..ad0fba2 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -360,12 +360,14 @@ gst_gl_display_init (GstGLDisplay * display, GstGLDisplayClass * klass)
#ifndef OPENGL_ES2
" fx = gl_TexCoord[0].x;\n"
" fy = gl_TexCoord[0].y;\n"
- " r=texture2DRect(tex,vec2(fx*2.0,fy)).r;\n"
- " g=texture2DRect(tex,vec2(fx*2.0,fy)).g;\n"
- " b=texture2DRect(tex,vec2(fx*2.0,fy)).b;\n"
- " r2=texture2DRect(tex,vec2(fx*2.0+1.0,fy)).r;\n"
- " g2=texture2DRect(tex,vec2(fx*2.0+1.0,fy)).g;\n"
- " b2=texture2DRect(tex,vec2(fx*2.0+1.0,fy)).b;\n"
+ " vec2 texcoords = vec2(fx * 2.0, fy);\n"
+ " vec2 texcoords2 = vec2(fx * 2.0 + 1.0, fy);\n"
+ " r=texture2DRect(tex, texcoords).r;\n"
+ " g=texture2DRect(tex, texcoords).g;\n"
+ " b=texture2DRect(tex, texcoords).b;\n"
+ " r2=texture2DRect(tex, texcoords2).r;\n"
+ " g2=texture2DRect(tex, texcoords2).g;\n"
+ " b2=texture2DRect(tex, texcoords2).b;\n"
#else
" fx = v_texCoord.x;\n"
" fy = v_texCoord.y;\n"