FreeframeGL ShaderLoader

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
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 »

The shaders don't seem to be sticking for me.

Let's say load up 8 ShaderLoaders on new deck. Assign a different shader to each.

Save, quit and restart - all the shaders are the same. Might happen on a deck change too.

Also, and I'm now regretting doing this, I save all shaders with a glsl extension (as opposed to txt) and have to change it to *.* every time. I could rename them all to txt but it'd be good to have a few different extensions and for the ShaderLoader to remember the last used.

I've tested a load of shaders and compared FPS with Magic Visuals. ShaderLoader matches more or less Magic with perhaps 2 or 3 less FPS consistently across the board. Neither Magic nor SL are in the same league as ShaderToy for FPS.

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 »

This will happen if you use the "Select" button to load shaders.

If there is no entry in the "Shader Name" field when the plugin initializes, the shader file path is retrieved from the registry. So if none of the instances you have set up have any name entry, they will all load the same shader.

But if you enter a shader name or full path into the "Shader Name" field, Resolume will then recall that shader file when you switch decks or restart, so this is independent for each instance of ShaderLoader you have set up. I just checked this again with two decks and it works OK.

ShaderLoader won't be as efficient as Magic because of the overhead in transferring textures between plugin and host. Plugins have some limitations for performance.

FPS is something I have been trying to resolve. It is dependent on viewport size. Resolume has some control over this because you can set the composition viewport size and if you display full screen, the fps is not affected.

ShaderToy speed is affected by the browser as well. Some things are fast and others are not. Try "Menger Journey" full screen. I find that it is not as fast as Resolume full screen with composition size at 640x480. But for larger composition sizes it slows down considerably.

It is possible to allow for different extensions in the FileOpen dialog. There is always a default though and you have to select another unless, as you say, the default is saved in the registry and that could be done. At the moment the ".txt" extension is added if there is none entered by the user.

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 »

Try this version of SpoutPanel.exe.

https://www.dropbox.com/sh/bqth9o79q3dv ... Evoca?dl=0

The File Open dialog will now list the extension of the file type that was last opened but only if that file type was "glsl" or "frag".

Because the extension has changed, the default application used to open the file with "Edit" in ShaderLoader has to be changed as well. Tested with "Notepad++" OK.

I have tested quickly with Resolume and it works as expected even if one instance loads a "txt" file and another loads a "glsl" file. It should not affect anybody who uses just text files.

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 »

The updated spout panel works a treat for me - much more natural workflow - thanks.

Thanks for the info on the shader path - logical and works as expected. For those Windows users that don't know, if you hold shift while right-clicking on a file, explorer gives the option to copy path (which works with one or multiple files) which can then be pasted straight into the Shader Name field.

It takes a bit of setup but until drag'n'drop from explorer or Resolume browser is there, you can get close with effect presets which provide that drag'n'drop loveliness from within Resolume.

One particular shader (four interlocking tetrahedra spinning in 3d) is 17fps in 1080p. If, instead of using the effect raw, I put it on a 720p clip, the resolution of the shader matches the clip and I get 29fps - more acceptable than the higher resolution especially if the anti-aliasing was better. So it is possible to fine tune the frame rate against resolution within a comp on a case by case basis.

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 »

That's all good.

The shift-rh-click method is also in the ShaderLoader pdf, along with other things, so everyone please read that.

What's happening with the clip is not so much the resolution of the clip, but the size of the viewport for the resolume cell containing the clip.

I have it set up so that if the shader uses a texture, and a texture is provided by the host, the resolution will match the size of the texture, otherwise it will be the viewport.

I can change it so that the resolution will match the texture size if one is provided by the host regardless of whether it is used by the shader, but perhaps let's leave it for now if it is working for you. Let me know what you think. If others might consider this too and comment, then we might reach the best method of setting the resolution.

User avatar
drazkers
Wants to marry Resolume, and Resolume said "yes!"
Posts: 968
Joined: Wed May 18, 2011 10:54
Location: Brady V up in Canada

Re: FreeframeGL ShaderLoader

Post by drazkers »

Just use the composition resolution. I don't wanna go into every file and set custom iResolutions. The fact this scales to whatever resolution my comp is using, be it 4k/1080p/720p is a major selling point.

Unlike the resolume mirror effect which looses its shit when i change resolutions.

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 »

Drazkers, stick it to the comp resolution as only option is not ideal either.
Sometimes you can play dxv clips at high fps on a 1080 comp, but have no power to move a shader.
Don't need to set up 'iresolutions' if shaderLoader take the comp res at default. But why not have the ability of change it when you needs?

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 »

Hi everybody.

I have made some revisions that allow many more ShaderToy shaders to be used and have added more example shaders. Please take note of the license terms for use of ShaderToy shaders, LICENCE.TXT in the "Shaders" folder.

SpoutPanel now supports the "glsl" extension so you need to update both "ShaderLoader.dll" and "SpoutPanel.exe".

Same link for release 1.0.2

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

But note that many shaders use a noise image to create noise, and will not work without one. Also many use two input textures. I forgot to add ShaderToy images, so until the next release look here :

https://www.dropbox.com/sh/eclov2q0hpaw ... -KJca?dl=0

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 »

Hello everybody,

for the shaders that you find useful and will use a lot, it is best to have a dedicated FreeFrameGL plugin that does not not rely on a shader file. So for people who are set up for Visual Studio and C++, here is a project that can make any number of them :

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

Download everything and unzip into in any folder, open the VS2010 solution file with Visual Studio and change to "release", it should build OK as-is. More examples are in the source file.

To make your own shader plugin, all you do is copy/paste the shader code into the source file, change the plugin information and rename the resulting dll. There are some things to take note of, but hopefully the code and documentation are clear enough.

Cheers to all,

Lynn Jarvis
spout.zeal.co

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 »

Lynn, this is awesome. I have some troubles compiling some shaders right now (strdup and stringify), but allready have a succesfully plugin to play with. :D

Post Reply