From fbc312b6cfc5c42d192e9216a920f82e34803daa Mon Sep 17 00:00:00 2001 From: mittorn Date: Fri, 13 Oct 2023 22:02:56 +0300 Subject: [PATCH] gl2shim: remove float suffix in shaders, that makes glsl100 work in swiftshader --- ref/gl/gl2_shim/fragment.glsl.inc | 2 +- ref/gl/gl2_shim/vertex.glsl.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ref/gl/gl2_shim/fragment.glsl.inc b/ref/gl/gl2_shim/fragment.glsl.inc index 6d3b0af8..803bc2bf 100644 --- a/ref/gl/gl2_shim/fragment.glsl.inc +++ b/ref/gl/gl2_shim/fragment.glsl.inc @@ -63,7 +63,7 @@ "#endif\n" "#if FEAT_FOG\n" "float fogDist = gl_FragCoord.z / gl_FragCoord.w;\n" -"float fogRate = clamp(exp(-uFog.w * fogDist), 0.f, 1.f);\n" +"float fogRate = clamp(exp(-uFog.w * fogDist), 0.0, 1.0);\n" "c.rgb = mix(uFog.rgb, c.rgb, fogRate);\n" "#endif\n" "oFragColor = c;\n" diff --git a/ref/gl/gl2_shim/vertex.glsl.inc b/ref/gl/gl2_shim/vertex.glsl.inc index 45e3e606..70986c06 100644 --- a/ref/gl/gl2_shim/vertex.glsl.inc +++ b/ref/gl/gl2_shim/vertex.glsl.inc @@ -37,7 +37,7 @@ "\n" "void main()\n" "{\n" -"gl_Position = uMVP * vec4(inPosition,1.0f);\n" +"gl_Position = uMVP * vec4(inPosition,1.0);\n" "#if ATTR_COLOR\n" "vColor = inColor;\n" "#endif\n"