0

Fix black dotted lines in night rendermode.

Also reduces the night rendermode render time by a 10% and increses the lighting rendermode render time by a 5% (globally it reduces the render time).
This commit is contained in:
Alejandro Aguilera
2011-08-28 12:18:51 +02:00
parent 40231598d8
commit 33e85743f2

View File

@@ -227,6 +227,24 @@ do_shading_with_mask(RenderModeLighting *self, RenderState *state,
/* this face isn't visible, so don't draw anything */
return;
}
} else if ((x == -1) && (state->left_blocks != Py_None)) {
unsigned char block = getArrayByte3D(state->left_blocks, 15, state->y, state->z);
if (!is_transparent(block)) {
/* the same thing but for adjacent chunks, this solves an
ugly black doted line between chunks in night rendermode.
This wouldn't be necessary if the textures were truly
tessellate-able */
return;
}
} else if ((y == 16) && (state->right_blocks != Py_None)) {
unsigned char block = getArrayByte3D(state->right_blocks, state->x, 0, state->z);
if (!is_transparent(block)) {
/* the same thing but for adjacent chunks, this solves an
ugly black doted line between chunks in night rendermode.
This wouldn't be necessary if the textures were truly
tessellate-able */
return;
}
}
black_coeff = get_lighting_coefficient(self, state, x, y, z);