Smooth block shadows / Large procedural blocks

This commit is contained in:
Anuken
2019-01-27 12:09:01 -05:00
parent f31fd622dd
commit 5a9307e9a7
9 changed files with 1336 additions and 1233 deletions

View File

@ -5,18 +5,13 @@ precision mediump int;
uniform sampler2D u_texture;
const float round = 0.23;
const float round = 0.01;
varying vec4 v_color;
varying vec2 v_texCoord;
void main() {
vec4 color = texture2D(u_texture, v_texCoord.xy);
color.a = 1.0 - color.r;
color.rgb = vec3(0.0);
color.a = float(int(color.a / round)) * round;
if(color.a >= 1.0 - round){
color.a = 1.0;
}
color = vec4(0.0, 0.0, 0.0, 1.0 - color.r);
gl_FragColor = color * v_color;
}