Skip to content

Commit

Permalink
Merge pull request #1211 from overviewer/ice-lighting
Browse files Browse the repository at this point in the history
fix lighting for flowing water and ice (issue #1205)
  • Loading branch information
agrif committed Feb 23, 2015
2 parents 9a3d4aa + 9ec0a75 commit 0422b0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions overviewer_core/src/primitives/lighting.c
Expand Up @@ -303,7 +303,7 @@ lighting_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyO
self = (RenderPrimitiveLighting *)data;
x = state->x, y = state->y, z = state->z;

if ((state->block == 9) || (state->block == 79)) { /* special case for water and ice */
if ((state->block == 8) || (state->block == 9)) { /* special case for water */
/* looks like we need a new case for lighting, there are
* blocks that are transparent for occlusion calculations and
* need per-face shading if the face is drawn. */
Expand All @@ -316,9 +316,9 @@ lighting_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyO
if ((state->block_pdata & 4) == 4) { /* bottom right */
do_shading_with_mask(self, state, x, y, z+1, self->facemasks[2]);
}
/* leaves are transparent for occlusion calculations but they
/* leaves and ice are transparent for occlusion calculations but they
* per face-shading to look as in game */
} else if (is_transparent(state->block) && (state->block != 18)) {
} else if (is_transparent(state->block) && (state->block != 18) && (state->block != 79)) {
/* transparent: do shading on whole block */
do_shading_with_mask(self, state, x, y, z, mask_light);
} else {
Expand Down

0 comments on commit 0422b0e

Please sign in to comment.