14 lines
480 B
GLSL
14 lines
480 B
GLSL
void SetupMaterial( inout Material mat )
|
|
{
|
|
vec2 coord = vTexCoord.st;
|
|
vec2 dist = 2.*texture(warptex,vTexCoord.st).xy-1.;
|
|
dist.y *= abs(mod(dist.x+timer*3.34536,4.)-2.)-1.;
|
|
coord.y += dist.y*.12;
|
|
dist = 2.*texture(warptex,vTexCoord.st*2.0).xy-1.;
|
|
dist.y *= abs(mod(dist.x+timer*5.45363,4.)-2.)-1.;
|
|
coord.y -= dist.y*.09;
|
|
coord.y = clamp(coord.y,0.,1.);
|
|
mat.Base = getTexel(coord);
|
|
mat.Bright = vec4(1.); // force fullbright
|
|
mat.Normal = ApplyNormalMap(vTexCoord.st);
|
|
}
|