Merge pull request #982 from RedSoxFan/fix-alpha

Fix alpha for src_rgba and src_rgbx
This commit is contained in:
emersion 2018-05-16 08:29:45 +01:00 committed by GitHub
commit 027ead2de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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";