IngameRenderer: damned thing finally works somewhat

This commit is contained in:
minjaesong
2018-06-30 16:47:22 +09:00
parent 54a38407e2
commit cf04b7d22a
17 changed files with 628 additions and 646 deletions

View File

@@ -8,10 +8,13 @@ varying vec2 v_texCoords;
uniform sampler2D u_texture; // world texture, has alpha value that is meaningful
uniform sampler2D tex1; // lightmap texture
uniform vec2 tex1Offset;
void main() {
vec4 colorTex0 = texture2D(u_texture, v_texCoords); // world texture
vec4 colorTex1 = texture2D(tex1, v_texCoords); // lightmap (RGBA)
gl_FragColor = colorTex0 * vec4(colorTex1.aaa, 1.0);
colorTex1 = vec4(colorTex1.www, 1.0);
gl_FragColor = colorTex0 * colorTex1;
}