mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-01 05:10:54 +00:00
Removed -f suffixes for floats (not supported on AMD)
This commit is contained in:
parent
7f6ff8929d
commit
3de2427e7c
13 changed files with 13 additions and 13 deletions
|
@ -10,7 +10,7 @@ uniform mat4 projection;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = projection * vec4(AttrPosition, 1.0f);
|
gl_Position = projection * vec4(AttrPosition, 1.0);
|
||||||
Color = AttrColor;
|
Color = AttrColor;
|
||||||
UV = AttrUV;
|
UV = AttrUV;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ void main()
|
||||||
vec4 c = texture(texture1, UV);
|
vec4 c = texture(texture1, UV);
|
||||||
|
|
||||||
// If this pixel is not drawn on...
|
// If this pixel is not drawn on...
|
||||||
if(c.a < 0.1f)
|
if(c.a < 0.1)
|
||||||
{
|
{
|
||||||
// Mix the colors of nearby pixels
|
// Mix the colors of nearby pixels
|
||||||
vec4 n = vec4(0.0);
|
vec4 n = vec4(0.0);
|
||||||
|
|
|
@ -10,7 +10,7 @@ uniform mat4 projection;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = projection * vec4(AttrPosition, 1.0f);
|
gl_Position = projection * vec4(AttrPosition, 1.0);
|
||||||
Color = AttrColor;
|
Color = AttrColor;
|
||||||
UV = AttrUV;
|
UV = AttrUV;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ void main()
|
||||||
if (Color.a > 0.0)
|
if (Color.a > 0.0)
|
||||||
{
|
{
|
||||||
vec3 cr = desaturate(c.rgb);
|
vec3 cr = desaturate(c.rgb);
|
||||||
FragColor = vec4((cr.r + Color.r) / 2.0f, (cr.g + Color.g) / 2.0f, (cr.b + Color.b) / 2.0f, c.a * rendersettings.w * Color.a);
|
FragColor = vec4((cr.r + Color.r) / 2.0, (cr.g + Color.g) / 2.0, (cr.b + Color.b) / 2.0, c.a * rendersettings.w * Color.a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,5 +23,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,5 +33,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ void main()
|
||||||
lightColorMod.rgb *= df;
|
lightColorMod.rgb *= df;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lightColor.a > 0.979f && lightColor.a < 0.981f) // attenuated light 98%
|
if (lightColor.a > 0.979 && lightColor.a < 0.981) // attenuated light 98%
|
||||||
lightColorMod.rgb *= diffuseContribution;
|
lightColorMod.rgb *= diffuseContribution;
|
||||||
|
|
||||||
if (lightColorMod.r <= 0.0 && lightColorMod.g <= 0.0 && lightColorMod.b <= 0.0)
|
if (lightColorMod.r <= 0.0 && lightColorMod.g <= 0.0 && lightColorMod.b <= 0.0)
|
||||||
|
|
|
@ -29,5 +29,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,5 +50,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,5 +40,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,5 +54,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,5 +20,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,5 +16,5 @@ void main()
|
||||||
if (FragColor.a < 0.5) discard;
|
if (FragColor.a < 0.5) discard;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue