diff options
author | emersion <contact@emersion.fr> | 2018-05-16 08:29:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 08:29:45 +0100 |
commit | 027ead2de7fd66c0c969c08e0341219f03599253 (patch) | |
tree | cd46344b495f358d24ae10dc073cb0369296796c /render | |
parent | 5758498831875833f5b616140bfca3def763c696 (diff) | |
parent | 35e83800d4f66008bfd9dc58fb4c5b407dc78dd3 (diff) |
Merge pull request #982 from RedSoxFan/fix-alpha
Fix alpha for src_rgba and src_rgbx
Diffstat (limited to 'render')
-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"; |