diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-05-15 22:29:36 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-05-15 22:29:36 -0400 |
commit | 35e83800d4f66008bfd9dc58fb4c5b407dc78dd3 (patch) | |
tree | b39b2f3f24e6587f1d5e9d4e1b900f476691833c | |
parent | 1e5b5d15a6da6e414ee4dec832d7d4a80e74f71e (diff) |
Fix alpha for src_rgba and src_rgbx
-rw-r--r-- | render/gles2/shaders.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/render/gles2/shaders.c b/render/gles2/shaders.c index ba3bd971..b940ee53 100644 --- a/render/gles2/shaders.c +++ b/render/gles2/shaders.c @@ -63,7 +63,8 @@ const GLchar tex_fragment_src_rgba[] = "uniform float alpha;\n" "\n" "void main() {\n" -" gl_FragColor = alpha * texture2D(tex, v_texcoord);\n" +" gl_FragColor.rgb = texture2D(tex, v_texcoord).rgb;\n" +" gl_FragColor.a = alpha * texture2D(tex, v_texcoord).a;\n" "}\n"; const GLchar tex_fragment_src_rgbx[] = @@ -73,7 +74,7 @@ const GLchar tex_fragment_src_rgbx[] = "uniform float alpha;\n" "\n" "void main() {\n" -" gl_FragColor.rgb = alpha * texture2D(tex, v_texcoord).rgb;\n" +" gl_FragColor.rgb = texture2D(tex, v_texcoord).rgb;\n" " gl_FragColor.a = alpha;\n" "}\n"; |