mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-26 00:38:44 -06:00
hopefully fix trans rendering bug
This commit is contained in:
parent
ec592951bc
commit
b596deeaed
|
@ -76,7 +76,7 @@ pub fn draw_world(
|
||||||
let world_position = position.as_vec3() * CHUNK_SIZE as f32;
|
let world_position = position.as_vec3() * CHUNK_SIZE as f32;
|
||||||
|
|
||||||
//Skip mesh if its empty
|
//Skip mesh if its empty
|
||||||
if mesh.index_buffer.len() == 0 {
|
if mesh.index_buffer.len() == 0 && mesh.trans_index_buffer.len() == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,6 +90,7 @@ pub fn draw_world(
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw chunk mesh
|
//Draw chunk mesh
|
||||||
|
if mesh.index_buffer.len() > 0 {
|
||||||
target.0.draw(
|
target.0.draw(
|
||||||
&mesh.vertex_buffer,
|
&mesh.vertex_buffer,
|
||||||
&mesh.index_buffer,
|
&mesh.index_buffer,
|
||||||
|
@ -103,6 +104,7 @@ pub fn draw_world(
|
||||||
},
|
},
|
||||||
&draw_parameters
|
&draw_parameters
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
if mesh.trans_index_buffer.len() > 0 {
|
if mesh.trans_index_buffer.len() > 0 {
|
||||||
enqueue_trans.push((chunk, mesh));
|
enqueue_trans.push((chunk, mesh));
|
||||||
|
|
Loading…
Reference in a new issue