diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 6500dbb..8496568 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -385912,7 +385912,7 @@ void model_draw_call(model_t m, int shader, int pass, vec3 cam_pos, mat44 model_ if (rs_idx > RENDER_PASS_OVERRIDES_BEGIN) { for(int i = 0; i < q->nummeshes; i++) { - array_push(drawcalls, (drawcall_t){i, 0}); + array_push(drawcalls, (drawcall_t){i, -1}); } } else { if(pass == -1 || pass == RENDER_PASS_OPAQUE) { @@ -385922,7 +385922,7 @@ void model_draw_call(model_t m, int shader, int pass, vec3 cam_pos, mat44 model_ drawcall_t call; call.mesh = i; call.tex = m.textures[i]; - call.distance = 0; + call.distance = -1; if (m.shading == SHADING_PBR) call.tex = m.materials[i].layer[MATERIAL_CHANNEL_ALBEDO].map.texture ? m.materials[i].layer[MATERIAL_CHANNEL_ALBEDO].map.texture->id : m.materials[i].layer[MATERIAL_CHANNEL_DIFFUSE].map.texture ? m.materials[i].layer[MATERIAL_CHANNEL_DIFFUSE].map.texture->id : texture_checker().id; array_push(drawcalls, call); diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c index 1cd2a81..090351e 100644 --- a/engine/split/v4k_render.c +++ b/engine/split/v4k_render.c @@ -4272,7 +4272,7 @@ void model_draw_call(model_t m, int shader, int pass, vec3 cam_pos, mat44 model_ if (rs_idx > RENDER_PASS_OVERRIDES_BEGIN) { for(int i = 0; i < q->nummeshes; i++) { - array_push(drawcalls, (drawcall_t){i, 0}); + array_push(drawcalls, (drawcall_t){i, -1}); } } else { if(pass == -1 || pass == RENDER_PASS_OPAQUE) { @@ -4282,7 +4282,7 @@ void model_draw_call(model_t m, int shader, int pass, vec3 cam_pos, mat44 model_ drawcall_t call; call.mesh = i; call.tex = m.textures[i]; - call.distance = 0; + call.distance = -1; if (m.shading == SHADING_PBR) call.tex = m.materials[i].layer[MATERIAL_CHANNEL_ALBEDO].map.texture ? m.materials[i].layer[MATERIAL_CHANNEL_ALBEDO].map.texture->id : m.materials[i].layer[MATERIAL_CHANNEL_DIFFUSE].map.texture ? m.materials[i].layer[MATERIAL_CHANNEL_DIFFUSE].map.texture->id : texture_checker().id; array_push(drawcalls, call); diff --git a/engine/v4k.c b/engine/v4k.c index d3c91be..b5b70c6 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -21071,7 +21071,7 @@ void model_draw_call(model_t m, int shader, int pass, vec3 cam_pos, mat44 model_ if (rs_idx > RENDER_PASS_OVERRIDES_BEGIN) { for(int i = 0; i < q->nummeshes; i++) { - array_push(drawcalls, (drawcall_t){i, 0}); + array_push(drawcalls, (drawcall_t){i, -1}); } } else { if(pass == -1 || pass == RENDER_PASS_OPAQUE) { @@ -21081,7 +21081,7 @@ void model_draw_call(model_t m, int shader, int pass, vec3 cam_pos, mat44 model_ drawcall_t call; call.mesh = i; call.tex = m.textures[i]; - call.distance = 0; + call.distance = -1; if (m.shading == SHADING_PBR) call.tex = m.materials[i].layer[MATERIAL_CHANNEL_ALBEDO].map.texture ? m.materials[i].layer[MATERIAL_CHANNEL_ALBEDO].map.texture->id : m.materials[i].layer[MATERIAL_CHANNEL_DIFFUSE].map.texture ? m.materials[i].layer[MATERIAL_CHANNEL_DIFFUSE].map.texture->id : texture_checker().id; array_push(drawcalls, call);