Skip to content
Snippets Groups Projects
Commit e6f13e22 authored by DarkGod's avatar DarkGod
Browse files

plop

parent 88a2e900
No related branches found
No related tags found
No related merge requests found
uniform sampler2D tex;
uniform float intensity;
uniform float fade;
uniform float tick;
void main(void)
{
vec2 pos = gl_TexCoord[0];
vec4 c = texture2D(tex, pos);
float v = gl_TexCoord[0].x;
v = min(clamp(v * 2.0, 0.0, 1.0), clamp((1.0 - v) * 2.0, 0.0, 1.0));
c.a *= v * v * intensity;
if (intensity < 1.0) c.a *= v;
c *= gl_Color;
if (fade > 0.0) {
c.a *= fade;
}
gl_FragColor = c;
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009 - 2015 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return {
frag = "main_fbo/gestures",
vert = nil,
args = {
tex = { texture = 0 },
intensity = intensity or 0.6,
fade = fade or 0,
},
clone = false,
permanent = true,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment