Search Result

  • RE: Scene Zoom

    Yes, you could use the [url=http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)]shader toolkit[/url] shaderViewport() function to zoom in/out, rotate the screen & various other things with easing options.P.S: you need Visionaire Studio 4.1 onwards to use the current shader toolkit script.

    by afrlme, 10 years ago

    16
    0
    afrlme 10 years ago
  • RE: shader effects help!

    Hi, if you use multiple shaders on objects you need to use multiple ShaderSets:The second call would be:[code]local eff="ripple3"shaderAddEffect(eff)shaderRemoveEffect(eff)shader_effects[eff].num.strength=1bind(eff, "time", field("shader_iTime"))shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, 2)Objects.object5.ShaderSet = 2[/code]Just change the id.

    by SimonS, 10 years ago

    2
    0
    SimonS 10 years ago
  • shader effects help!

    Hi again guys, I want use shader effect in a scene object. If only use one effect to objects works. ok I do this:ActionsAt the beggining of the scene:Execute a script: local eff2="tv2" shaderAddEffect(eff2) shaderRemoveEffect(eff2) shader_effects[eff2].num.strength=1 bind(eff2, "time", field("shader_iTime")) shaderSetOptions({{shader = shader_effects[eff2].num(), comp_dst=5, comp_src=4 }}, 1) Objects.object1.ShaderSet = 1 Objects.object2.ShaderSet = 1 Objects.object3.ShaderSet = 1 Objects.object4.ShaderSet = 1Execute a script: local eff="ripple3" shaderAddEffect(eff) shaderRemoveEffect(eff) shader_effects[eff].num.strength=1 bind(eff, "time", field("shader_iTime")) shaderSetOptions({{shader = shader_effects[eff].num(), comp_dst=5, comp_src=4 }}, 1) Objects.object5.ShaderSet = 1Ok, If only put one of the script.work perfect.But if I want two diferent shadereffects in a two diferents objects in the same scene, I cant. Always works only the last shader efecct applied. can you help me? I read wiki but dont get it. Thanks in advance :).

    by yoyan, 10 years ago

    2
    0
    yoyan 10 years ago
  • RE: Fisheye effect

    But is it possible to exclude the balance animation? I guess i can create it as an interface otherwise.And btw the shader is really cool thing :P

    by ke4, 10 years ago

    18
    0
    ke4 10 years ago
  • RE: Fisheye effect

    Aha, i want just weak effect of the fish eye and it seems to work ok.I'm building a scene where the character walks over the ledge.The problem is that it affets inventory as well, but i think someone wrote on the forum about excluding in the shader once.[b]EDIT:[/b]It was actually you :D[code]game.ShaderExclude = eShaderExcludeInterfaces -- excludes text, cursors & interfaces, or...game.ShaderExclude = eShaderExcludeTextsAndCursor -- excludes text & cursors, or...game.ShaderExclude = eShaderExcludeCursor -- excludes cursors.[/code]

    by ke4, 10 years ago

    18
    0
    ke4 10 years ago
  • RE: Fisheye effect

    The shader toolkit is very extensible, I've coded a small test part (include the shader toolkit before running this)[code]shader_effects["fisheye"] = {shader=basic_fsh..[[uniform float amount;void mainImage( out vec4 fragColor, in vec2 fragCoord ){ vec2 p = fragCoord.xy / iResolution.x;//normalized coords with some cheat //(assume 1:1 prop) float prop = iResolution.x / iResolution.y;//screen proroption vec2 m = vec2(0.5, 0.5 / prop);//center coords vec2 d = p - m;//vector from center to current fragment float r = sqrt(dot(d, d)); // distance of pixel from center float power = ( 2.0 * 3.141592 / (2.0 * sqrt(dot(m, m))) ) * (amount - 0.5);//amount of effect float bind;//radius of 1:1 effect if (power > 0.0) bind = sqrt(dot(m, m));//stick to corners else {if (prop //Weird formulas vec2 uv; if (power > 0.0)//fisheye uv = m + normalize(d) * tan(r * power) * bind / tan( bind * power); else if (power uv = m + normalize(d) * atan(r * -power * 10.0) * bind / atan(-power * bind * 10.0); else uv = p;//no effect for power = 1.0 vec3 col = texture2D(iChannel0, vec2(uv.x, uv.y * prop)).xyz;//Second part of cheat //for round effect, not elliptical fragColor = vec4(col, 1.0);}void main(){ vec4 color; mainImage(color, texcoord.xy*iResolution.xy); gl_FragColor = color;}]]}shaderAddEffect("fisheye")shaderEffectParam("fisheye", "amount", 0.45)[/code]I've based this on [url=https://www.shadertoy.com/view/4s2GRR]https://www.shadertoy.com/view/4s2GRR[/url]. You can change the amount on the botton, with 0.5 being no change and 0.0 maximum fisheye and 1.0 being maximum bulge.You can even easily animate that:[code]fisheye_amount = 0.5bind("fisheye", "amount", field("fisheye_amount"))startTween("fisheye_amount", fisheye_amount, 0.44, 1000, easeQuadInOut, true, true)[/code]

    by SimonS, 10 years ago

    18
    0
    SimonS 10 years ago
  • RE: Fisheye effect

    You will need to integrate a glsl shader into the shader toolkit, like this one:https://github.com/ruby-processing/Example-Sketches/blob/master/samples/processing_app/topics/shaders/data/FishEye.glslShouldn't be too difficult to do, have a look at how glow and blur are implemented into the toolkit :)

    by fulviov, 10 years ago

    18
    0
    fulviov 10 years ago
  • Fisheye effect

    Hi,Is it possible in some way to use shader to achieve fisheye effect on the whole screen? thanks.

    by ke4, 10 years ago

    18
    0
    ke4 10 years ago
  • RE: Turn off shaderlamp.

    [code]bind("light2", "lights[1].targetpos", point(inverty(scrollfix(field("{x=1000,y=900}"))), 0))[/code]should be[code]bind("light1", "lights[1].targetpos", point(inverty(scrollfix(field("{x=1000,y=900}"))), 0))[/code]"light1" is the name of the shader, you can't change this. The light id is in lights[0] etc.And it's working.

    by SimonS, 10 years ago

    11
    0
    SimonS 10 years ago
  • RE: aply Shaderexclude to objects.

    No, you can't exclude objects & no it's not possible to apply a shader effect to the background only however...You could add the background as a scene object & apply a shader object effect to the scene object you've added the background image to.Check out this thread @ www.visionaire-studio.net/forum/thread/visionaire-shader-toolkit-demo/ for a template of how to apply shader effects to scenes & objects.For a list of available shader effects check out this [url=http://wiki.visionaire-tracker.net/wiki/ShaderAddEffect_(CMS)]page[/url] on the wiki.

    by afrlme, 10 years ago

    2
    0
    afrlme 10 years ago