mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed terrain sprite transparency layering
This commit is contained in:
parent
fe2ad92201
commit
27c208d1a5
@ -602,16 +602,9 @@ impl Terrain {
|
||||
focus_pos: Vec3<f32>,
|
||||
) {
|
||||
// Opaque
|
||||
for (_, chunk) in &self.chunks {
|
||||
if chunk.visible {
|
||||
renderer.render_terrain_chunk(&chunk.opaque_model, globals, &chunk.locals, lights);
|
||||
}
|
||||
}
|
||||
|
||||
// Translucent
|
||||
for (pos, chunk) in &self.chunks {
|
||||
if chunk.visible {
|
||||
renderer.render_fluid_chunk(&chunk.fluid_model, globals, &chunk.locals, lights);
|
||||
renderer.render_terrain_chunk(&chunk.opaque_model, globals, &chunk.locals, lights);
|
||||
|
||||
const SPRITE_RENDER_DISTANCE: f32 = 128.0;
|
||||
|
||||
@ -632,5 +625,12 @@ impl Terrain {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Translucent
|
||||
for (_, chunk) in &self.chunks {
|
||||
if chunk.visible {
|
||||
renderer.render_fluid_chunk(&chunk.fluid_model, globals, &chunk.locals, lights);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user