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

@@ -2,10 +2,13 @@ varying vec4 v_color;
varying vec2 v_texCoords;
uniform sampler2D u_texture;
void main(void) {
vec4 color = texture2D(u_texture, v_texCoords);
color = floor(15.0 * color + 0.5) / 15.0;
vec4 color = texture2D(u_texture, v_texCoords).rgba;
color.r = floor(15.0 * color.r + 0.5) / 15.0;
color.g = floor(15.0 * color.g + 0.5) / 15.0;
color.b = floor(15.0 * color.b + 0.5) / 15.0;
// a: passthrough
gl_FragColor = color;
}