flak_m/shaders/glsl/FizzDistortXY.fp

15 lines
502 B
GLSL

void SetupMaterial( inout Material mat )
{
vec2 coord = vTexCoord.st;
vec2 dist = 2.*texture(warptex,vTexCoord.st*.6).xy-1.;
dist.x *= abs(mod(dist.y+timer*1.34536,4.)-2.)-1.;
coord.x += dist.x*.12;
dist = 2.*texture(warptex,vTexCoord.st*1.2).xy-1.;
dist.y *= abs(mod(dist.x+timer*1.45363,4.)-2.)-1.;
coord.y -= dist.y*.09;
coord.x += timer*.05346;
coord.y += timer*.03425;
mat.Base = getTexel(coord);
mat.Bright = vec4(1.); // force fullbright
mat.Normal = ApplyNormalMap(vTexCoord.st);
}