Pages

sâmbătă, 19 iunie 2021

Shadertoy: iChannel texture - 002.

In the last example I created a surface with a texture by channel inputs.
Now, I add a sphere distortion and sphere distortion with movement.
This is the source code I used:
#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;
}

vineri, 18 iunie 2021

Stone Story RPG game.

An auto-RPG with strategic combat, deep crafting and programming elements, animated entirely in ASCII-art. In a realm of perpetual darkness, a single stone could change everything...see more on the Steam webpage.
You can see the graphic with ascii for this game on this youtube video:

joi, 17 iunie 2021

Ubisoft and climate.

I don't know exactly how much they will solve in the future climate, but it is a nice gesture from the Ubisoft team to make people give up excessive energy consumption. Finally, a break and a reflection can be worth a lot in a few years ...
Take a break and you will be satisfied that you are not destroying your future with a disastrous climate.

miercuri, 16 iunie 2021

Shadertoy: iChannel texture - 001.

In this example with shadertoy online tool I will show you how to map a texture from iChannel texture input and UV areas.
 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;
} 
You can see this example online:

marți, 15 iunie 2021

Scavengers game online from Epic Games.

Scavengers is your strategic survival battleground. Enter a free-to-play action shooter where squads of three compete to survive and dominate in a hybrid of sandbox-style PVE and class-based PVP. Choose from a roster of adaptive Explorers, arm yourself with a combination of unique abilities and weapons, and conquer the challenges of a hostile wasteland. Outthink and outfight enemy players and the dwellers of the frozen Earth.
Available in the Steam and Epic Game store under Wiondows O.S.
All characters: KALI, CRUZ, HALDEN, JAE, LETTY, TARIK,VALORA.
This ia video intro from the official channel:

luni, 14 iunie 2021

Rainbow Six Extraction Operator Showcase Ela.

Rainbow Exogenous Analysis & Containment Team, or simply REACT is a division of Team Rainbow that was established to combat the Archæans in the late 2010s.
It is a faction that is set to appear in Tom Clancy's Rainbow Six
You can see a video from the official youtube channel with Elżbieta Ela Bosak is a REACT Operator.
Ela is capable of throwing sticky mines that stun all enemies who dare to get close. This skill has a cooldown and is restored over time. She is also immune to control effects. At the beginning of the game, the operative fights with a Scorpion EVO 3 submachine gun, but as the game progresses, it will be possible to unlock other weapons.