Added passes for premultiplied alpha, fixed alpha blending for native transparency

This commit is contained in:
Jarcode
2018-02-12 16:25:32 -08:00
parent f021457abd
commit b86870e0fd
9 changed files with 112 additions and 67 deletions

View File

@@ -0,0 +1,15 @@
#request nativeonly true
#request uniform "prev" tex
uniform sampler2D tex;
out vec4 fragment;
in vec4 gl_FragCoord;
void main() {
fragment = texelFetch(tex, ivec2(gl_FragCoord.x, gl_FragCoord.y), 0);
#if PREMULTIPLY_ALPHA > 0
fragment.rgb *= fragment.a;
#endif
}