This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Until 1 Dec 2026 all licenses are 30 % off, for example the Indie Bundle for €69.30 instead of €99. The code BLACKFRIDAY is applied automatically at checkout.
See licenses Try it for freeshader_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 < 1.0) bind = m.x; else bind = m.y;}//stick to borders
//Weird formulas
vec2 uv;
if (power > 0.0)//fisheye
uv = m + normalize(d) * tan(r * power) * bind / tan( bind * power);
else if (power < 0.0)//antifisheye
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)
fisheye_amount = 0.5
bind("fisheye", "amount", field("fisheye_amount"))
startTween("fisheye_amount", fisheye_amount, 0.44, 1000, easeQuadInOut, true, true)
game.ShaderExclude = eShaderExcludeInterfaces -- excludes text, cursors & interfaces, or...
game.ShaderExclude = eShaderExcludeTextsAndCursor -- excludes text & cursors, or...
game.ShaderExclude = eShaderExcludeCursor -- excludes cursors.
game.ShaderExclude = eShaderExcludeInterfaces
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.