UI: sub-UIs work?

This commit is contained in:
minjaesong
2017-07-25 17:21:02 +09:00
parent 2ddb2af0e4
commit 46b4dd7532
31 changed files with 390 additions and 283 deletions

View File

@@ -1,4 +1,7 @@
#version 120
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;

View File

@@ -1,4 +1,7 @@
#version 120
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;

View File

@@ -1,4 +1,7 @@
#version 120
#version 100
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
@@ -11,18 +14,5 @@ void main(void) {
vec4 colorTex0 = texture2D(u_texture, v_texCoords); // lightmap (RGB) pre-mixed
vec4 colorTex1 = texture2D(tex1, v_texCoords); // lightmap (A) pre-mixed
vec4 newColor = vec4(0.0, 0.0, 0.0, colorTex0.a);
if (colorTex0.r > colorTex1.r) newColor.r = colorTex0.r;
else newColor.r = colorTex1.r;
if (colorTex0.g > colorTex1.g) newColor.g = colorTex0.g;
else newColor.g = colorTex1.g;
if (colorTex0.b > colorTex1.b) newColor.b = colorTex0.b;
else newColor.b = colorTex1.b;
gl_FragColor = newColor;
gl_FragColor = vec4(max(colorTex0.rgb, colorTex1.rgb), colorTex0.a);
}