new collision displacer: got one-block-ceiling-passthru bug, but otherwise tolerable

This commit is contained in:
minjaesong
2017-07-06 16:35:58 +09:00
parent 3eadb6b5e5
commit 19a094b2fa
11 changed files with 298 additions and 189 deletions

View File

@@ -0,0 +1,16 @@
#ifdef GL_ES
precision mediump float;
#endif
varying vec4 v_color;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
uniform mat4 u_projTrans;
void main() {
vec3 color = texture2D(u_texture, v_texCoords).rgb;
float gray = (3.0 * color.r + 4.0 * color.g + color.b) / 8.0;
vec3 grayscale = vec3(gray);
gl_FragColor = vec4(grayscale, 1.0);
}