Removed -f suffixes for floats (not supported on AMD)

This commit is contained in:
Magnus Norddahl 2019-12-21 01:34:51 +01:00
parent 7f6ff8929d
commit 3de2427e7c
13 changed files with 13 additions and 13 deletions

View file

@ -10,7 +10,7 @@ uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(AttrPosition, 1.0f);
gl_Position = projection * vec4(AttrPosition, 1.0);
Color = AttrColor;
UV = AttrUV;
}

View file

@ -36,7 +36,7 @@ void main()
vec4 c = texture(texture1, UV);
// If this pixel is not drawn on...
if(c.a < 0.1f)
if(c.a < 0.1)
{
// Mix the colors of nearby pixels
vec4 n = vec4(0.0);

View file

@ -10,7 +10,7 @@ uniform mat4 projection;
void main()
{
gl_Position = projection * vec4(AttrPosition, 1.0f);
gl_Position = projection * vec4(AttrPosition, 1.0);
Color = AttrColor;
UV = AttrUV;
}

View file

@ -27,7 +27,7 @@ void main()
if (Color.a > 0.0)
{
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
{

View file

@ -23,5 +23,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -33,5 +33,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -56,7 +56,7 @@ void main()
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;
if (lightColorMod.r <= 0.0 && lightColorMod.g <= 0.0 && lightColorMod.b <= 0.0)

View file

@ -29,5 +29,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -50,5 +50,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -40,5 +40,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -54,5 +54,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -20,5 +20,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}

View file

@ -16,5 +16,5 @@ void main()
if (FragColor.a < 0.5) discard;
#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));
}