OpenGL fragment shader filter
Examples gst-launch-1.0 videotestsrc ! glupload ! glshader fragment="\"`cat myshader.frag`\"" ! glimagesink
FBO (Frame Buffer Object) and GLSL (OpenGL Shading Language) are required. Depending on the exact OpenGL version chosen and the exact requirements of the OpenGL implementation, a #version
header may be required.
The following is a simple OpenGL ES (also usable with OpenGL 3 core contexts) passthrough shader with the required inputs.
#version 100
#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 );
}
Hierarchy Factory details
Authors: â
Classification: â Filter/Effect
Rank â none
Plugin â opengl
Package â GStreamer Base Plug-ins
Pad Templatessink
video/x-raw(ANY):
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
texture-target: 2D
video/x-raw(memory:GLMemory):
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
texture-target: 2D
Presence â always
Direction â sink
Object type â GstPad
src
video/x-raw(memory:GLMemory):
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
texture-target: 2D
video/x-raw(ANY):
format: RGBA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
texture-target: 2D
Presence â always
Direction â src
Object type â GstPad
Signals create-shaderGstGLShader * create_shader_callback (GstElement * param_0, gpointer udata)
def create_shader_callback (param_0, udata):
#python callback for the 'create-shader' signal
function create_shader_callback(param_0: GstElement * param_0, udata: gpointer udata): {
// javascript callback for the 'create-shader' signal
}
Parameters:
param_0
â
udata
â
Flags: Run Last
Properties fragmentâfragmentâ gchararray
GLSL fragment source
Flags : Read / Write
Default value : NULL
shaderâshaderâ GstGLShader *
GstGLShader to use
Flags : Read / Write
uniformsâuniformsâ GstStructure *
GLSL Uniforms
Flags : Read / Write
update-shaderâupdate-shaderâ gboolean
Emit the 'create-shader' signal for the next frame
Flags : Read / Write
Default value : false
vertexâvertexâ gchararray
GLSL vertex source
Flags : Read / Write
Default value : NULL
The results of the search are
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4