[orx-fx] convert to MPP

This commit is contained in:
Edwin Jakobs
2021-06-27 21:07:44 +02:00
parent 7d524df2de
commit 4dfc5c31c8
144 changed files with 1197 additions and 847 deletions

View File

@@ -0,0 +1,31 @@
#ifdef OR_IN_OUT
in vec2 v_texCoord0;
#else
varying vec2 v_texCoord0;
#endif
uniform sampler2D tex0;
uniform sampler2D tex1;
#ifndef OR_GL_FRAGCOLOR
out vec4 o_color;
#endif
void main() {
#ifndef OR_GL_TEXTURE2D
vec4 src = texture(tex0, v_texCoord0);
vec4 dest = texture(tex1, v_texCoord0);
#else
vec4 src = texture2D(tex0, v_texCoord0);
vec4 dest = texture2D(tex1, v_texCoord0);
#endif
float lboth = src.a * dest.a;
vec4 result = src * lboth;
#ifdef OR_GL_FRAGCOLOR
gl_FragColor = result;
#else
o_color = result;
#endif
}