-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Providing GLSL Transitions to Movie Editors #56
Comments
@rectalogic: I'm a complete neophyte in OpenGL, so I was about to naively try to run my GLSL in OpenGL, how is that not possible? I'm curious, how far ANGLE goes with this WebGL -> OpenGL conversion, does it even run JavaScript? frei0r sounds awesome, for the example of ffmpeg, do you think that would be possible to have this kind of CLI usage #43 or do you see limitation I don't see? Thanks |
WebGL GLSL is based on OpenGL ES 2.0 and has a number of differences with the various versions of OpenGL GLSL http://stackoverflow.com/a/8872201/239247 . Google Chrome uses ANGLE to translate WebGL GLSL into GLSL that can be used with OpenGL (since the browser is probably using OpenGL). It doesn't use JavaScript, ANGLE basically takes the WebGL GLSL shader source and transforms it to OpenGL GLSL - just translating between two versions of GLSL. You can see that being done here - I'm converting shader source code from SH_WEBGL_SPEC to SH_GLSL_OUTPUT. And yes, I think you can do a CLI like #43 - see the examples of how to use frei0r with ffmpeg today: So we would have a new |
Crap, I wrote most of this (a frei0r mixer2 transition using GLSL) then realized ffmpeg does not support frei0r mixer2 transitions - it only supports frei0r generators and filters. |
MLT supports frei0r mixer2. Anyway here's a work in progress, currently uses a hardcoded WebGL transition and isn't yet working for a number of reasons. Another approach might be to use movit, which MLT also supports. movit does shader concatenation, and requires you to use macros for your uniforms and shader function, so this would complicate transforming glsl.io shaders. |
Awesome!! very cool progress :-) |
Hi @rectalogic , That's nice because this approach allows me to share all the glsl-transition logic (also glsl-transition-validator is used on glsl.io) and I was able to write my cli wrapper in 100 LoC. However, Of-course this would only be for the purpose of validation + thumbnail. It won't change the fact we need proper C/C++ implementation if we want to plug in native web editors. Your frei0r plugin looks awesome I've read the source code, haven't tried to run it yet. I was wondering if we can make a "core" library which would be independent of frei0r and build the frei0r plugin on top of it. Maybe it doesn't make sense? I think we will need a "glsl parser" to parse the uniforms and dynamically bind them from the JSON uniforms. OpenGL/C++ is new for me but if you want I could try to work on this. Thanks |
ANGLE will validate the GLSL and report human readable errors. It also has an API to extract the uniforms from the GLSL it parsed. See ShGetVariableInfo. Once shad0r is working, you can use it to write a simple thumbnail extractor - just write a small app that loads the shad0r plugin and calls f0r_init, f0r_construct and then f0r_update2 passing in the from and to image buffers and the time you want to render at (e.g. 0.5), and getting out the rendered GLSL image buffer. |
Awesome if we can get uniforms programmatically :-) When I say validation it is more functional validation. A transition have a Thanks 2014-06-20 22:30 GMT+02:00 Andrew Wason notifications@github.com:
Gaëtan Renaudeau, greweb.fr |
Just a little 🆙 A few people are requesting this feature. This is not an easy task to implementing. But it would be incredible for GLSL Transitions ecosystem to grow. |
@gre @rectalogic I needed this functionality for a project, so I decided to implement it as a new ffmpeg filter. You can check out the source here -- would love to hear your thoughts! I'm not transpiling the shader source via ANGLE yet because ANGLE seems like a beast. I'm also not sure it's necessary, as webgl glsl appears to be stricter than desktop glsl and the gl-transitions I've tested with have all worked so far. |
@transitive-bullshit this is awesome!!! |
One of the goal of GLSL.io is to provide transitions for Video Editors.
from @rectalogic :
The text was updated successfully, but these errors were encountered: