Skip to content
Snippets Groups Projects
Commit da284f85 authored by dg's avatar dg
Browse files

for later

git-svn-id: http://svn.net-core.org/repos/t-engine4@3467 51575b47-30f0-44d4-a5cc-537603b46e54
parent 03f8e705
No related branches found
No related tags found
No related merge requests found
uniform sampler2D tex;
void main(void)
{
// gl_FragColor = texture2D(tex, gl_TexCoord[0].xy);
int blursize = 3;
float blur = 3.0;
vec2 offset = 1.0 / vec2(512.0, 512.0);
// Center Pixel
vec4 sample = vec4(0.0,0.0,0.0,0.0);
float factor = ((float(blursize)*2.0)+1.0);
factor = factor * factor;
for(int i = -blursize; i <= blursize; i++)
{
for(int j = -blursize; j <= blursize; j++)
{
sample += texture2D(tex, vec2(gl_TexCoord[0].xy+vec2(float(i)*offset.x, float(j)*offset.y)));
}
}
sample /= (blur*2.0) * (blur*2.0);
gl_FragColor = sample * 0.8;
// gl_FragColor += vec4(0.3, 0.3, 0.3, 0);
}
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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 = "sun",
vert = nil,
args = {
},
clone = false,
}
game/modules/tome/data/gfx/shockbolt/terrain/sun_surface.png

280 KiB

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