[gstreamer-bugs] [Bug 600195] dynamic fragment shader filter and variables parser/loader
bugzilla at gnome.org
Thu Nov 5 09:28:09 PST 2009
GStreamer | gst-plugins-gl | git
--- Comment #6 from Luc <luc.deschenaux at freesurf.ch> 2009-11-05 17:28:05 UTC ---
The main purposes for plugin glshader are:
- To be able to specify shaders and uniform variables initial values in the
command line, without having to (re)compile any gst-plugin.
- To be able to change shaders or uniform variables values at runtime from a
gstreamer application using g_object_set, without having to (re)compile any
Sure you can use it as base in a design phase for a plugin where you must
absolutely add some extra code on the C side.
But when no C code is required i dont see the advantage to build a GStreamer
plugin for every shader. More, not everybody knowing or learning GLSL is able
to do it or want to invest time for it.
On the other hand it would be nice to be able to modify variables for existing
filters, and to store shaders in /usr/share/gstreamer instead of hardcoding
Im still working on glshader. Now you can also specify a vertex shader, and i
may add some functionalities as and when i understand better what could be
needed (for example concerning vertex attributes initialisation, or concerning
any other resolvable C side requirements).
I would prefer to have reused the 3DLabs open source GLSL parser from their
glsl-validator. But 3DLabs became ZiiLabs and i didn't find the validator nor
the sourcecode. Anyway i dont know if it was GPL compatible.
The parser code is not very complex as the variable declaration syntax is not:
There's a lot of copy/paste with minor changes for each data type. It took me
one day and a few bugfixes. I wont dare to say it's yet totally bugfree, but
normally it will not require a lot of maintenance (if any) since syntax is not
subject to change.
gst_gl_shadervariables can also be used as interface to store and/or to load
binary representations of uniform variable sets, using struct
gst_gl_shadervariable_desc and function gst_gl_shadervariable_set()
I could still implement automatic type casting, getting the variable types in
the shader source, but it is not crucial.
I'll post here a cleaner and more documented patch asap.
Thank you !
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