Merge branch 'treeco/fix-tree-artefact' into 'master'

Fixed leaf lerp doing weird things

See merge request veloren/veloren!899
This commit is contained in:
Joshua Barretto 2020-04-09 21:39:45 +00:00
commit a60f4ea4e2

View File

@ -579,9 +579,8 @@ pub fn block_from_structure(
) -> Option<Block> {
let field = RandomField::new(structure_seed + 0);
let lerp = 0.5
+ ((field.get(Vec3::from(structure_pos)) % 256) as f32 / 256.0 - 0.5) * 0.85
+ ((field.get(Vec3::from(pos)) % 256) as f32 / 256.0 - 0.5) * 0.15;
let lerp = ((field.get(Vec3::from(structure_pos)).rem_euclid(256)) as f32 / 255.0) * 0.85
+ ((field.get(pos + std::i32::MAX / 2).rem_euclid(256)) as f32 / 255.0) * 0.15;
match sblock {
StructureBlock::None => None,