Skip to content

Commit 7a55d33

Browse files
greatmastermarioCounterPillow
authored andcommitted
Fixed custom depth rendering
1 parent acf6479 commit 7a55d33

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/config.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,10 +1101,10 @@ Depth
11011101
**Options**
11021102

11031103
min
1104-
lowest level of blocks to render. Default: 0
1104+
lowest level of blocks to render. Default: -64
11051105

11061106
max
1107-
highest level of blocks to render. Default: 255
1107+
highest level of blocks to render. Default: 319
11081108

11091109
Exposed
11101110
Only renders blocks that are exposed (adjacent to a transparent block).

overviewer_core/rendermodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ class HeightFading(RenderPrimitive):
6767
class Depth(RenderPrimitive):
6868
name = "depth"
6969
options = {
70-
"min": ("lowest level of blocks to render", 0),
71-
"max": ("highest level of blocks to render", 255),
70+
"min": ("lowest level of blocks to render", -64),
71+
"max": ("highest level of blocks to render", 319),
7272
}
7373

7474
class Exposed(RenderPrimitive):

overviewer_core/src/primitives/depth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ depth_start(void* data, RenderState* state, PyObject* support) {
3737
static bool
3838
depth_hidden(void* data, RenderState* state, int32_t x, int32_t y, int32_t z) {
3939
PrimitiveDepth* self = (PrimitiveDepth*)data;
40-
y += 16 * state->chunky;
40+
y += 16 * (state->chunky - 4);
4141
if (y > self->max || y < self->min) {
4242
return true;
4343
}

0 commit comments

Comments
 (0)