[Bug 740239] glshader receives no input from the pipeline

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Nov 17 01:23:55 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=740239
  GStreamer | gst-plugins-bad | 1.4.3

Matthew Waters <ystreet00> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ystreet00 at gmail.com

--- Comment #1 from Matthew Waters <ystreet00 at gmail.com> 2014-11-17 09:23:48 UTC ---
(In reply to comment #0)
> When using glshader, you can output image but there is no input. Does it still
> expect the (deprecated) glupload?
> 
> This gives black image, though it should be a zero effect and just output the
> input.
> 
> gst-launch-1.0 videotestsrc ! video/x-raw, width=1280, height=720 ! glshader
> location=minimal.frag ! glimagesink
> 
> Where minimal.frag is:
> #extension GL_ARB_texture_rectangle : enable
> uniform sampler2DRect tex;
> void main() {
>   gl_FragColor = texture2DRect(tex, gl_TexCoord[0].xy);
> }
> 
> 
> This (correctly) gives blue image:
> gst-launch-1.0 videotestsrc ! video/x-raw, width=1280, height=720 ! glshader
> location=blue.frag ! glimagesink
> 
> Where blue.frag is:
> #extension GL_ARB_texture_rectangle : enable
> uniform sampler2DRect tex;
> void main() {
>   gl_FragColor = vec4(0,0,255,1.0);
> }

None of the gl elements use rectangle textures anymore and the use of
gl_TexCoord[i] references the fixed function pipeline which is also not
supported.  The use of integers in the vec4 definition are also not spec
compliant (which suggests you have an nvidia card) and are clamped to the
[0.0f, 1.0f] range anyway.

Try going with:

#ifdef GL_ES
precision mediump float;
#endif
varying vec2 v_texcoord;
uniform sampler2D tex;
uniform float time;
uniform float width;
uniform float height;

void main () {
  gl_FragColor = texture2D(tex, v_texcoord);
}

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list