mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added grass blending
This commit is contained in:
parent
29ecb14c45
commit
fd529b5462
@ -120,8 +120,13 @@ impl<'a> Sampler for BlockGen<'a> {
|
|||||||
Some(Block::new(2, col))
|
Some(Block::new(2, col))
|
||||||
}
|
}
|
||||||
} else if (wposf.z as f32) < height {
|
} else if (wposf.z as f32) < height {
|
||||||
|
let col = Lerp::lerp(
|
||||||
|
dirt_col.map(|e| e as f32 / 255.0),
|
||||||
|
surface_color,
|
||||||
|
(wposf.z as f32 - (height - 4.0)) * 0.25,
|
||||||
|
);
|
||||||
// Surface
|
// Surface
|
||||||
Some(Block::new(1, surface_color.map(|e| (e * 255.0) as u8)))
|
Some(Block::new(1, col.map(|e| (e * 255.0) as u8)))
|
||||||
} else if (wposf.z as f32) < CONFIG.sea_level {
|
} else if (wposf.z as f32) < CONFIG.sea_level {
|
||||||
// Ocean
|
// Ocean
|
||||||
Some(water)
|
Some(water)
|
||||||
|
Loading…
Reference in New Issue
Block a user