ShaderLoader

Home Forums Spout Announcements ShaderLoader

This topic contains 29 replies, has 4 voices, and was last updated by  leadedge 1 year, 2 months ago.

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #1193

    leadedge
    Keymaster

    Hello to everybody for 2015,

    here’s a spin-off from the Spout project, a FreeframeGL plugin that will load shader files created from GLSL Sandbox or ShaderToy.

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

    There are some limitations such as no audio input, only two input textures and not all of the pre-defined uniform variables are supported. But nevertheless many many of the shaders on the websites work straight away. With attention to licensing and credit to the authors, this effectively creates a huge number of instant freeframe plugins.

    You can select the shader files with a file selection dialog and edit them. Spout users will need to update “SpoutPanel” with this latest version by copying “SpoutPanel.exe” to the host program folder and replacing the old version.

    The plugin has been tested on a limited number of computers, so please give your feedback on this forum.

    Cheers to all,

    Lynn Jarvis

    #1194

    yochee
    Participant

    A happy new year for you, too! What a nice gift!

    Was a bit confused as the zip says Source Code .. downloaded it, installed the dll from the binaries folder + shader demo files. Found the Shader Loader ffgl under effects instead of sources. Dropped one SL-object to an empty slot, input the name of a shader .txt-file and it works.
    The ease of using code in Resolume!

    Want:
    1. Resolume should integrate a way to look up the txt-files in their file browser, to use those files just like video files
    2. live code mode with the program code on screen πŸ™‚
    3. subfolders to have a better overview (own, effects, generators..)

    Win 7 / NVidia GT 540M

    this is really awesome!! thank you!

    #1195

    leadedge
    Keymaster

    Hi Yochee.

    yes that “Source code” button is a bit confusing. It actually downloads the entire repository. A ZIP can be added so I will think about that for the next release.

    The plugin has to be an “Effect” because it can take texture inputs. But it also works as a “Source” so it doesn’t fit nicely into one or the other of these two concepts.

    This could be extended quite a bit, but it is a plugin after all. I think the enhancements you want need to be done by the host and maybe developers will be looking at these possibilities. The Shadertoy concept is great but there are limitations. I think there is a lot of potential for “ISF” by VDMX and maybe this will lead somewhere.

    #1196

    franco
    Participant

    Oh, I love it!
    Just a little feedback.

    I dropped the Shaders file next to the dll, as pointed in the pdf.
    My path becomes then C:\Program Files (x86)\Resolume Arena 4.1.11\plugins\vfx add\Shaders\
    When I press Select, show me a spout dialog wich says: “/FILEOPEN” (and an OK button). Nothing happens beyond that.

    So, I’ve tried to paste the path to one file of Shaders folder, and again nothing happens.
    In that case (with a path manually setted) if I press EDIT have this message:
    Windows can’t find the file: “C:\Program Files (x86)\Resolume Arena 4.txt”
    I think you know what is happen here.

    I’ve copied the shaders folder in C: root, then pasting paths is working as expected.
    Is there a way to setting up the default path to use the Select dialog?
    Some registry modification maybe?

    πŸ™‚

    #1197

    leadedge
    Keymaster

    Thanks franco,

    ShaderLoader needs the new copy of “SpoutPanel.exe” (Version 2.03) to get the FileOpen dialog. So copy it into “C:\Program Files (x86)\Resolume Arena 4.1.11\”. Then the file selection should work.

    The other problem seems to be that it assumes everything after the first “4” is an extension. I will have a look at that, otherwise the Arena vfx path will not work.

    It should work if you create “C:\Program Files (x86)\Common Files\Freeframe” and put the shaderloader dll in there and set up this as a plugins folder within Arena. Then remove “SjaderLoader.dll” from the vfx folder. Finally make a shaders folder “C:\Program Files (x86)\Common Files\Freeframe\Shaders” for the shaders.

    Creating a user-defined shader path needs an installer to do that and I am thinking about this also.

    #1198

    leadedge
    Keymaster

    Update on that. Corrections are now made. Download the updated release at :

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

    Let me know whether it works for you.

    #1203

    franco
    Participant

    Sorry about the delay.
    Now is working like a charm!
    Select panel or pasting a long path without any trouble.
    I think, if there’s no other need you can avoid the installer.
    Is everything running smooth! πŸ˜‰

    #1204

    franco
    Participant

    Leadedge, just a tought for future updates.
    Will be nice if we can know what file is loaded via Select Panel.
    I undestand is not so easy, since you need to clear the path before use the panel,
    but in case you didn’t notice.

    #1205

    leadedge
    Keymaster

    Yes I know about this and it would be great if I could fill that “Shader Name” entry field. It would solve a lot of problems. Unfortunately it is a limitation of Freeframe. A plugin can’t write information in the host GUI. Whatever is passed back has to be processed by the host. There is a function that sends alternate values for slider controls and I have activated that. You will notice these in the sliders for the plugin, but there is no equivalent for text.

    Also a Freeframe plugin does not have a drop-down list for selections, so using SpoutPanel in this way is outside the specification. It works though. You might have noticed that I updated SpoutPanel for the file open dialog to look for glsl file types. This seems to have worked out.

    https://www.dropbox.com/sh/bqth9o79q3dvh8g/AAB9Kc-8kmY8yqgPCwN_Evoca?dl=0

    The shader paths seem OK now but I am still thinking of revising the Spout installer.

    #1206

    franco
    Participant

    Oh, plugin can’t write information in the host. You’re right, I missed that.
    You can rewrtite the panel to avoid exlorer and show an open dialog with the last paht used,
    but seems to be a minor thing to such work!
    Anyway, we already can press edit to know it.
    Yes, I follow the threath on resolume forum, so already have the panel update πŸ™‚

    • This reply was modified 2 years, 5 months ago by  franco.
    #1208

    leadedge
    Keymaster

    I tried writing the last path into the FileOpen dialog entry field. But the Microsoft common dialog disables a full path entry and only the file name is displayed. Also I found that it was scrolled to the left and only the last 16 characters showed, so I let it blank again. This is really annoying and I have yet to find a solution.

    #1209

    leadedge
    Keymaster

    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/eclov2q0hpaw5ly/AAAZX1kA5HQc5ADPvt7E-KJca?dl=0

    #1210

    leadedge
    Keymaster

    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/releases/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

    #1246

    franco
    Participant

    Hi, Lynn. Can you help me with this noob question?
    Built a release is working when I use the plugin on the same system, but dlls are not working on another windows installation (with visual runtimes). I see a simple shader makes a 44kb file or so. Is something I’m missing at build time?
    First timer on VS here.

    • This reply was modified 2 years, 4 months ago by  franco.
    #1250

    leadedge
    Keymaster

    Do you see any error messages or does the dll just not show up in Resolume?

    It is still most likely to be a runtime problem. Try changing “Properties > C/C++ > Code Generation to /MT instead of /MD.

    Another thing you can try is to un-comment the console window code and insert print statements where the plugin initializes and see what you find.

    You might also have to be formally correct with specifying the number of inputs. If your shader generates the graphics and does not use any textures, set both minimum and maximum to 0. Then it will show up in the Resolume sources. If the shader uses a texture, set minimum to 1 and the maximum to the number of textures used. Then it will show up as an effect. If you set both to 2, it will show up as a blend mode.

    The file size is about right.

Viewing 15 posts - 1 through 15 (of 30 total)

You must be logged in to reply to this topic.