mkxp-freebird/shader/flashMap.frag
Jonas Kulla 7a6c05bba0 Implement animated flash tiles in Tilemap
Flash tiles start with an alpha of 60, which ramps up to 120
in 16 frames and 4 steps, then ramps down again over the same period.
2013-09-23 08:27:28 +02:00

13 lines
169 B
GLSL

uniform float alpha;
varying vec4 v_color;
void main()
{
vec4 frag = vec4(0, 0, 0, 1);
frag.rgb = mix(vec3(0, 0, 0), v_color.rgb, alpha);
gl_FragColor = frag;
}