From 2e4a5a75c022adcdb3375ac912c9fa19e9b929f7 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 29 Oct 2025 19:33:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9D=80=E8=89=B2=E5=99=A8?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E5=85=BC=E5=AE=B9=E6=80=A7=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Spine/Utils/SFMLShader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Spine/Utils/SFMLShader.cs b/Spine/Utils/SFMLShader.cs index 31156cd..33631f4 100644 --- a/Spine/Utils/SFMLShader.cs +++ b/Spine/Utils/SFMLShader.cs @@ -14,7 +14,7 @@ namespace Spine.Utils /// private const string FRAGMENT_VertexAlpha = "uniform sampler2D t;" + - "void main() { vec4 p = texture(t, gl_TexCoord[0].xy);" + + "void main() { vec4 p = texture2D(t, gl_TexCoord[0].xy);" + "p.rgb *= p.a * gl_Color.a;" + "gl_FragColor = gl_Color * p; }" ; @@ -24,7 +24,7 @@ namespace Spine.Utils /// private const string FRAGMENT_VertexAlphaPma = "uniform sampler2D t;" + - "void main() { vec4 p = texture(t, gl_TexCoord[0].xy);" + + "void main() { vec4 p = texture2D(t, gl_TexCoord[0].xy);" + "p.rgb *= gl_Color.a;" + "gl_FragColor = gl_Color * p; }" ; @@ -34,8 +34,8 @@ namespace Spine.Utils /// private const string FRAGMENT_InvPma = "uniform sampler2D t;" + - "void main() { vec4 p = texture(t, gl_TexCoord[0].xy);" + - "if (p.a > 0) p.rgb /= max(max(max(p.r, p.g), p.b), p.a);" + + "void main() { vec4 p = texture2D(t, gl_TexCoord[0].xy);" + + "if (p.a > 0.0) p.rgb /= max(max(max(p.r, p.g), p.b), p.a);" + "gl_FragColor = p; }" ;