License from €75
DE EN FR ES IT CZ

Torch effect like in Lone Survivor?

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

  1. · 8 years ago
    Torch effect like in Lone Survivor? I mean, the dark surrounding and following the player. Anyway to do that?
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.

    Get 15 % off Try it for free
  3. · 8 years ago
    The professional way would be a shader, but I have no idea how to do that, maybe look into vignetting?

    The age old  way is and image with a transparent dot in the center twice the size of the stage as a cursor or following overlay
  4. · 8 years ago
    You can do it with a Shader, I failed dismally but Simon put me right:
    local name = "vignette"
    shader_effects[name] = { shader = Shaders.vignette.Compiled }
    shaderAddEffect(name)
    shader_effects[name].num.u_resolution = {1920,1080}
    shader_effects[name].num.vPos = {1920/2,1080/2}

    varying vec2 uv;
    uniform sampler2D texel;
    uniform vec2 u_resolution;
    uniform vec2 vPos;
    void main ()
    {
      vec4 color = texture2D(texel, uv);
      vec2 position = uv - vec2(0.5);           
      float dist = length(position * vec2(u_resolution.x/u_resolution.y, 1.0));
    
      float radius = 0.5;
      float softness = 0.09;
      float vignette = smoothstep(radius, radius - softness, dist);
      color.rgb = color.rgb - (1.0 - vignette);
      gl_FragColor = color;
    }
  5. · 8 years ago
    You need the shader tool kit, its called  shaderscript11.lua and you'll find it in the wiki


    Order matters! so the shaderscript11 is listed first then the script with the vignette shader script
  6. · 8 years ago
    Thank you guys I m gonna check it out.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?