fix sorting
parent
a9e6680d05
commit
fe31cf69db
|
@ -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) {
|
if (rs_idx > RENDER_PASS_OVERRIDES_BEGIN) {
|
||||||
for(int i = 0; i < q->nummeshes; i++) {
|
for(int i = 0; i < q->nummeshes; i++) {
|
||||||
array_push(drawcalls, (drawcall_t){i, 0});
|
array_push(drawcalls, (drawcall_t){i, -1});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(pass == -1 || pass == RENDER_PASS_OPAQUE) {
|
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;
|
drawcall_t call;
|
||||||
call.mesh = i;
|
call.mesh = i;
|
||||||
call.tex = m.textures[i];
|
call.tex = m.textures[i];
|
||||||
call.distance = 0;
|
call.distance = -1;
|
||||||
if (m.shading == SHADING_PBR)
|
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;
|
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);
|
array_push(drawcalls, call);
|
||||||
|
|
|
@ -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) {
|
if (rs_idx > RENDER_PASS_OVERRIDES_BEGIN) {
|
||||||
for(int i = 0; i < q->nummeshes; i++) {
|
for(int i = 0; i < q->nummeshes; i++) {
|
||||||
array_push(drawcalls, (drawcall_t){i, 0});
|
array_push(drawcalls, (drawcall_t){i, -1});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(pass == -1 || pass == RENDER_PASS_OPAQUE) {
|
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;
|
drawcall_t call;
|
||||||
call.mesh = i;
|
call.mesh = i;
|
||||||
call.tex = m.textures[i];
|
call.tex = m.textures[i];
|
||||||
call.distance = 0;
|
call.distance = -1;
|
||||||
if (m.shading == SHADING_PBR)
|
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;
|
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);
|
array_push(drawcalls, call);
|
||||||
|
|
|
@ -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) {
|
if (rs_idx > RENDER_PASS_OVERRIDES_BEGIN) {
|
||||||
for(int i = 0; i < q->nummeshes; i++) {
|
for(int i = 0; i < q->nummeshes; i++) {
|
||||||
array_push(drawcalls, (drawcall_t){i, 0});
|
array_push(drawcalls, (drawcall_t){i, -1});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(pass == -1 || pass == RENDER_PASS_OPAQUE) {
|
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;
|
drawcall_t call;
|
||||||
call.mesh = i;
|
call.mesh = i;
|
||||||
call.tex = m.textures[i];
|
call.tex = m.textures[i];
|
||||||
call.distance = 0;
|
call.distance = -1;
|
||||||
if (m.shading == SHADING_PBR)
|
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;
|
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);
|
array_push(drawcalls, call);
|
||||||
|
|
Loading…
Reference in New Issue