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

fix shaders for silly osx

parent eed6f99a
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ void main(void)
float phase = clamp((tick - tick_start) / explosion_time_factor, 0.0, 1.0);
if(is_exploding < 0.5)
phase = 0;
phase = 0.0;
float innerSpherePhase = clamp(phase / coreEndTime, 0.0, 1.0);
//vec3 color = clamp(gl_Color.rgb * (1.0 + pow(innerSpherePhase, 2.0) * 10.0), 0.0, 1.0);
......@@ -234,7 +234,7 @@ void main(void)
float outerSpherePhase = clamp((phase - outerSphereStartTime) / (outerSphereEndTime - outerSphereStartTime), 0.0, 1.0);
vec4 outerSphereColor = vec4(0.0, 0.0, 0.0, 0.0);
if(outerSpherePhase > 0)
if(outerSpherePhase > 0.0)
{
float outerSphereRadius = innerSphereRadius + (0.5 - innerSphereRadius) * outerSpherePhase;
float sinAlpha = radiusLen / outerSphereRadius;
......
......@@ -7,8 +7,8 @@ void main(void)
{
float time = tick / 1000.0;
vec2 xy = gl_TexCoord[0].xy;
// if (xy.y <= 0.5) xy.x = xy.x + (0.5-xy.y) * sin(time + mapCoord.x / 40 + mapCoord.y) / 14.0;
if (xy.y <= 0.75) xy.x = xy.x + (0.75-xy.y) * sin(time + mapCoord.x / 40 + mapCoord.y) / attenuation;
// if (xy.y <= 0.5) xy.x = xy.x + (0.5-xy.y) * sin(time + mapCoord.x / 40.0 + mapCoord.y) / 14.0;
if (xy.y <= 0.75) xy.x = xy.x + (0.75-xy.y) * sin(time + mapCoord.x / 40.0 + mapCoord.y) / attenuation;
// xy.x = xy.x + (1.0-xy.y) * sin(time + mapCoord.x / 40 + mapCoord.y) / attenuation;
gl_FragColor = texture2D(tex, xy) * gl_Color;
}
......@@ -24,7 +24,7 @@ void main(void)
sample += texture2D(tex, vec2(gl_TexCoord[0].xy+vec2(float(i)*offset.x, float(j)*offset.y)));
}
}
sample /= float((blursize*2.0) * (blursize*2.0));
sample /= (float(blursize)*2.0) * (float(blursize)*2.0));
float a = 1.0-center.a;
......
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