Fixed custom depth rendering
This commit is contained in:
parent
acf6479f4c
commit
7a55d33e8f
|
@ -1101,10 +1101,10 @@ Depth
|
|||
**Options**
|
||||
|
||||
min
|
||||
lowest level of blocks to render. Default: 0
|
||||
lowest level of blocks to render. Default: -64
|
||||
|
||||
max
|
||||
highest level of blocks to render. Default: 255
|
||||
highest level of blocks to render. Default: 319
|
||||
|
||||
Exposed
|
||||
Only renders blocks that are exposed (adjacent to a transparent block).
|
||||
|
|
|
@ -67,8 +67,8 @@ class HeightFading(RenderPrimitive):
|
|||
class Depth(RenderPrimitive):
|
||||
name = "depth"
|
||||
options = {
|
||||
"min": ("lowest level of blocks to render", 0),
|
||||
"max": ("highest level of blocks to render", 255),
|
||||
"min": ("lowest level of blocks to render", -64),
|
||||
"max": ("highest level of blocks to render", 319),
|
||||
}
|
||||
|
||||
class Exposed(RenderPrimitive):
|
||||
|
|
|
@ -37,7 +37,7 @@ depth_start(void* data, RenderState* state, PyObject* support) {
|
|||
static bool
|
||||
depth_hidden(void* data, RenderState* state, int32_t x, int32_t y, int32_t z) {
|
||||
PrimitiveDepth* self = (PrimitiveDepth*)data;
|
||||
y += 16 * state->chunky;
|
||||
y += 16 * (state->chunky - 4);
|
||||
if (y > self->max || y < self->min) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue