Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Micro Infection

Play as a virus and infect as many cells as possible before your lymphocytic demise. · By SIsilicon

Background

A topic by joel127 created Feb 24, 2020 Views: 134 Replies: 2
Viewing posts 1 to 3

I'm interested to know how you did that organic weird moving background, is it a 2D shader? The effect is really cool!

Developer (1 edit)

Yeah it's a 2D shader. :)

It's base is a seamless noise texture. The colour of the noise is sampled by a gradient texture, but the sampling coordinates is offset with time to make it look alive. I'll share the shader code later.


Edit:

shader_type canvas_item;
uniform sampler2D noise;
uniform sampler2D color_ramp; uniform vec2 offset; varying vec2 UV2; void vertex() {
UV2 = VERTEX / 800.0;
} void fragment() {
float color_off = sin(TIME + FRAGCOORD.x / 50.0);
COLOR = texture(color_ramp, texture(noise, UV2 + offset).rr - color_off*0.015);

COLOR.rgb *= mix(1.0 - length(UV - 0.5) * 2.0, 1.0, 0.7);
}

Oh, ok I "think" I understand :) Thanks!