FreeframeGL ShaderLoader

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
User avatar
francoe
Is seriously in love with Resolume. Met the parents and everything
Posts: 378
Joined: Thu Nov 27, 2008 23:30

Re: FreeframeGL ShaderLoader

Post by francoe »

Joris, about the layer underneath as second texture. Can you explain a little bit how the fx clips works?
I mean, when you load an fx as clip gives you the ability of setting up what will be affected (comp, layer1, layers 2, etc). I'm aware that in certain comps-sittuations have an unexpected behaviour (think about the usual settings with a matrox and asigned layers to slices). Is that selector just a jump in the fx pipeline's order?

I think the approuch of 2 layers for feeding a shader is not possible in the way Lynn is sugesting.
At least in my undestanding, a simple shader will not see Layer1 as iChannel1.
I don't know if we can sample an external image file either, right now I'm just feeding iChannel1 with perling noise, and inside shader stuff.

Remember, I don't know if my words have any sense, but I like to see life in this threath :P

leadedge
Hasn't felt like this about software in a long time
Posts: 104
Joined: Fri Feb 14, 2014 13:58

Re: FreeframeGL ShaderLoader

Post by leadedge »

Unfortunately with the ShaderLoader plugin I don't think it is possible to sample two textures in Resolume without knowing in advance that this is necessary. Then the plugin has to be recompiled as a blend mode.

For the plugin to appear as a blend mode, MinInputs must be set to 2. Then it will appear in the blend list but not in the effects list. Vice-versa if MinInputs is not equal to 2. Currently the plugin will not operate as a blend mode.

If a shader uses a noise image on Channel0 and a colour image on Channel1 (Texture flow II and III), the colour image is put in Layer 1 and the noise image in Layer 2. The plugin is applied to the noise image in Layer 2.

If a shader uses a colour image on Channel0 and a noise image on Channel1 (Texture Swirl), the colour image is put in Layer 2 and the noise image in Layer 1. The plugin is applied to the colour image in Layer 2.

This can only be done if the plugin is recompiled with MinInputs set to 2.

Given the specifications of Freeframe and the design of Resolume, plugins work OK if they are designed for one purpose. ShaderLoader is a multi-function effect/source but extending this to a blend mode as well is not possible.

It is of course possible to set MinInputs to 2 in your own plugin and use it as a blend mode, but there are complications with the relative sizes of the two textures and the viewport which causes texture wrapping that I have not been able to resolve.

At the moment I believe that if the two textures are the same aspect ratio and the colour image is taken from Channel0 and the noise image from Channel1 it should work.

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: FreeframeGL ShaderLoader

Post by Joris »

The Resolume environment is different from the Shadertoy environment. One is made for shader development, the other is meant for media playback and compositing. This results in differences in the workflow and render pipeline. So it makes sense that there is no single, one-size fits all method where you could take everything Shadertoy has to offer and copy/paste it in to Resolume.

A possible next step could be to create a special type of source clip where you can copy/paste shader code. This clip could then expose one or more input texture dropdowns, similar to how the Layer Router and Effect Clips work, like Francoe suggests. This would need to be done on the host side, because Resolume has no way to handle these extra texture requests from a regular FFGL plugin. Added advantages could be exposing of parameters to external control and of course live coding.

But it's truly amazing what Lynn has been able to create and share so far. The possibilities are perhaps not endless, but pretty darn huge. Let's focus on doing some awesome things with it, before we focus on adding more stuff to it.

leadedge
Hasn't felt like this about software in a long time
Posts: 104
Joined: Fri Feb 14, 2014 13:58

Re: FreeframeGL ShaderLoader

Post by leadedge »

Thanks Joris,

it gets more complex for a Freeframe plugin that has to adapt to different hosts which have different aims and designs and I have reached the limit of what I can do with this particular plugin.

But it will work just fine with one texture input or none at all with a great number of shaders and, as you say, if people can explore using it within these limitations then that is all good. I am certain this sort of thing has a lot of potential and that there are minds at work on the possibilities.

Cheers,

Lynn

leadedge
Hasn't felt like this about software in a long time
Posts: 104
Joined: Fri Feb 14, 2014 13:58

Re: FreeframeGL ShaderLoader

Post by leadedge »

The ShaderToy specification now includes a "mainImage" function instead of "main". Changes made to ShaderLoader and ShaderMaker now allow these shaders to work. The older format is still supported.

ShaderLoader : https://github.com/leadedge/ShaderLoader/releases

ShaderMaker : https://github.com/leadedge/ShaderMaker/releases

Sadler
Hasn't felt like this about software in a long time
Posts: 240
Joined: Tue Sep 20, 2011 23:55

Re: FreeframeGL ShaderLoader

Post by Sadler »

Thanks - any thoughts about handling the ISF format from VDMX?

leadedge
Hasn't felt like this about software in a long time
Posts: 104
Joined: Fri Feb 14, 2014 13:58

Re: FreeframeGL ShaderLoader

Post by leadedge »

Yes I have had thoughts about it, but not so much time.

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: FreeframeGL ShaderLoader

Post by Joris »


leadedge
Hasn't felt like this about software in a long time
Posts: 104
Joined: Fri Feb 14, 2014 13:58

Re: FreeframeGL ShaderLoader

Post by leadedge »

Thanks Joris,

for one I must say I had not seen that. Although it seems mostly unfinished, this is an excellent resource I think. Copy/paste from ShaderToy is great but to know what it all means is the way to go further.

Still working on ShaderLoader and maybe a few revisions coming up.

leadedge
Hasn't felt like this about software in a long time
Posts: 104
Joined: Fri Feb 14, 2014 13:58

Re: FreeframeGL ShaderLoader

Post by leadedge »

ShaderMaker MacOSX port by Amaury Hazan http://vidibox.net, http://billaboop.com. Supported by Coldcut/Ninja Tune as a contribution to the Visuals Community.

https://github.com/leadedge/ShaderMaker ... /tag/1.0.2

More details here :

http://vjunion.net/t/shadermaker-for-wi ... o-ffgl/596

. . .

Post Reply