The russian game development named Kefir Games comes with a new game: Frostborn.
The Ice Abode, Treasures of the North, new camp buildings and chat improvements await in a new update, immortals!
2D, 3D, game, games, online game, game development, game engine, programming, OpenGL, Open AI, math, graphics, design, graphic, graphics, game development, game engine, programming, web development, web art, web graphic, arts, tutorial, tutorials,
1 MODE 1:VDU 19,0,4,0,0,0:VDU 19,1,6,0,0,0
2 COLOUR 1
3 PRINT:PRINT " **** COMODORE 64 BASIC V2 ****"
4 PRINT:PRINT " 64K RAM SYSTEM 38911 BASIC BYTES FREE"
5 PRINT:PRINT "READY."
#define PI 3.1415926
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
// get poins
vec2 p = (2.0 * fragCoord - iResolution.xy) / iResolution.y;
// set surface formula
vec3 v = vec3(p.x, p.y, sqrt(1.0 - p.x * p.x - p.y * p.y));
// create normals
vec3 n = normalize(v);
// https://en.wikipedia.org/wiki/Distortion_(optics)
vec2 sphere_distortion = vec2(atan(n.z, n.x) / PI,0.00000001 * p.y);
vec4 color = vec4(0.0,0.0,0.0,0.0);
if (uv.x > 0.0 && uv.x < 0.5)
{
//color = texture(iChannel0, vec2(1.0 - (uv.x/0.5),uv.y/0.5)+ sphere_distortion);
// with movement iTime
color = texture(iChannel0, vec2(1.0 * iTime- (uv.x/0.5),uv.y/0.5)+ sphere_distortion);
}
else if (uv.x > 0.5 && uv.x < 1.0)
{
//color = texture(iChannel1, vec2((uv.x/0.5),uv.y)+ sphere_distortion);
// with movement iTime
color = texture(iChannel0, vec2(iTime-(uv.x/0.5),uv.y)+ sphere_distortion);
}
fragColor = color;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
vec4 color = vec4(0.0,0.0,0.0,0.0);
if (uv.x > 0.0 && uv.x < 0.5)
{
color = texture(iChannel0, vec2(1.0 - (uv.x/0.5), uv.y/0.5));
}
else if (uv.x > 0.5 && uv.x < 1.0)
{
color = texture(iChannel1, vec2(1.0 - (uv.x/0.5), uv.y));
}
fragColor = color;
}