Fluffier trees
This commit is contained in:
parent
6a219e7e45
commit
d0f1749ef2
5
world.js
5
world.js
@ -44,6 +44,9 @@ varying lowp float vDistance;
|
||||
|
||||
void main() {
|
||||
highp vec4 color = texture2D(uSampler, vTextureCoord);
|
||||
if (color.a < 0.1) {
|
||||
discard;
|
||||
}
|
||||
lowp float fogamount = smoothstep(40.0, 100.0, vDistance);
|
||||
gl_FragColor = mix(vec4(vLighting * color.rgb, color.a), vec4(uFogColor, 1.0), fogamount);
|
||||
}
|
||||
@ -296,7 +299,7 @@ function makeFaces(chunk, blocks, neighbors) {
|
||||
}
|
||||
if (isTransparent(chunk.data[bi])) {
|
||||
for (const { dir, faceCenter } of neighbors(i, j, k)
|
||||
.filter(({ block }) => block === BlockType.AIR)
|
||||
.filter(({ block }) => isTransparent(block) && block !== BlockType.WATER)
|
||||
) {
|
||||
if (chunk.data[bi] === BlockType.WATER) {
|
||||
faceCenter[1] -= 0.15;
|
||||
|
Loading…
Reference in New Issue
Block a user