DE EN FR ES IT CZ
Back Back to top

Shaders Manual / Tutorial ?

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  • #1, by davide-berardi 9 years ago Quote
    Hey guys, I've been looking for a manual / tutorial on how to use shaders in V5 with no success. Does anyone have links or suggestions?

    Thank you!

    Davide
  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by stroncis 9 years ago Quote
    Bread and butter: https://www.visionaire-studio.com/luadocs/

    Additionaly you just can enter keyword shader in forum LINK or wiki search fields.

    Though i doubt, that wiki is up to date.

    P.S.: weird, cannot add second link as LINK https://wiki.visionaire-tracker.net/index.php?title=Special%...
  • #3, by afrlme 9 years ago Quote
    There's a bunch of shader stuff & examples on the luadocs page, but it doesn't really explain how to use or write custom shaders. I think if you want to write custom shaders then you will likely have to use google to find some places to learn GLSL.
  • #4, by davide-berardi 9 years ago Quote
    Thanks guys. I had thought that shaders would work like particle effects, where there was no scripting needed. I guess I was wrong. Appreciate the help!
  • #5, by afrlme 9 years ago Quote
    Thanks guys. I had thought that shaders would work like particle effects, where there was no scripting needed. I guess I was wrong. Appreciate the help!
    No, unfortunately not, but maybe down the line Simon might implement some basic shaders that can be applied & tweaked with action parts like they have in Construct 2 - it would be nice for those of us that aren't familiar with GLSL. Oh well... here's hoping, eh? wink

  • #6, by stothew 9 years ago Quote
    at least a snippet how to bind the "ready ones" e.g. from shadertoolkit10 to single Objects would be nice.

    I found an old example but it did not work in V5. On the hole screen they work well.


    What i tried so far:
    local eff="ripple1" -- effect name
    
    -- the following lines are to make sure the shader is compiled, 
    -- a shader is mini program, that needs to be compiled to use it
    
    shaderAddEffect(eff)
    shaderRemoveEffect(eff)
    
    -- this is a standard setting, the shader has a variable that is called strength, we set that to 1
    
    shader_effects[eff].num.strength=1
    
    -- also for any animation inside the shader, it needs the time, 
    -- so we bind the variable time in the shader to our time
    
    bind(eff, "time", field("shader_iTime"))
    
    shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, 1)
    
    -- simplest thing of them, set the object "target_object" to the effect channel 1
    Scenes.stadtpark_see.Objects.gfx_see_wasser.ShaderSet = 1
    and
    local eff = "ripple1"
    local obj = "gfx_see_wasser"
    
    shaderRemoveEffect(eff)
    shaderAddEffect(eff)
    
    bind(eff, "time", field("getTime()*0.001"))
    
    shader_effects[eff] = { shader = Shaders[eff].Compiled }
    
    Objects[obj].ShaderSet = shader_effects[eff].num.num
    has anybody a working example?

  • #7, by davide-berardi 9 years ago Quote
    @AFRLme: that would be nice! Together with a nice tutorial on the audio system smile
  • #8, by stroncis 9 years ago Quote
    Thanks guys. I had thought that shaders would work like particle effects, where there was no scripting needed. I guess I was wrong. Appreciate the help!
    There are two shader creation/editing options for less/non code savvy users.

    One is something like visual node editing interface (f.e. Unity native Shader Graph or plugin Amplify), which is very complex thing to achieve and it's not reasonable for Visionaire to do.

    Second option is prebuild shaders (like ShaderToolkit for Visionaire), but integrated in game development platform GUI. Now this is in scope of features we can ask and hope for. Going further from this idea, it would lead to user custom shaders as plugins with bindings to custom GUI, easily shared in Visionaire community.