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.https://wiki.visionaire-tracker.net/wiki/Compiled_Index_of_Lua_Scripts_for_Visionaire_Studio#Shader_Toolkit_FunctionsWhat 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 itshaderAddEffect(eff)shaderRemoveEffect(eff)-- this is a standard setting, the shader has a variable that is called strength, we set that to 1shader_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 timebind(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 1Scenes.stadtpark_see.Objects.gfx_see_wasser.ShaderSet = 1andlocal 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?
by stothew, 7 years ago