From fc26305ac861dad558d4f59fc7cb11e9e0ea5698 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Wed, 11 Nov 2020 16:20:14 +0000 Subject: [PATCH] Increases maximum sprite dimensions (if you suspect an issue, check this commit) --- voxygen/src/mesh/segment.rs | 5 +++-- voxygen/src/scene/terrain.rs | 2 +- world/src/layer/scatter.rs | 31 ++++++++++--------------------- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/voxygen/src/mesh/segment.rs b/voxygen/src/mesh/segment.rs index 3f64ef4edb..56cd5bc237 100644 --- a/voxygen/src/mesh/segment.rs +++ b/voxygen/src/mesh/segment.rs @@ -159,9 +159,10 @@ where && lower_bound.z <= upper_bound.z ); let greedy_size = upper_bound - lower_bound + 1; + // TODO: Should this be 16, 16, 64? assert!( - greedy_size.x <= 16 && greedy_size.y <= 16 && greedy_size.z <= 64, - "Sprite size out of bounds: {:?} ≤ (15, 15, 63)", + greedy_size.x <= 32 && greedy_size.y <= 32 && greedy_size.z <= 64, + "Sprite size out of bounds: {:?} ≤ (31, 31, 63)", greedy_size - 1 ); // NOTE: Cast to usize is safe because of previous check, since all values fit diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index bb15f1862a..5f7af950e0 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -291,7 +291,7 @@ impl Terrain { }| Vec3::new(x, y, z), ) .unwrap_or(zero); - let max_model_size = Vec3::new(15.0, 15.0, 63.0); + let max_model_size = Vec3::new(31.0, 31.0, 63.0); let model_scale = max_model_size.map2(model_size, |max_sz: f32, cur_sz| { let scale = max_sz / max_sz.max(cur_sz as f32); if scale < 1.0 && (cur_sz as f32 * scale).ceil() > max_sz { diff --git a/world/src/layer/scatter.rs b/world/src/layer/scatter.rs index 8a47d0fee9..aa2b33ce88 100644 --- a/world/src/layer/scatter.rs +++ b/world/src/layer/scatter.rs @@ -195,7 +195,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas) { // Desert Plants (DeadBush, false, |c, _| { ( - close(c.temp, 1.0, 0.95).min(close(c.humidity, 0.0, 0.3)) * MUSH_FACT * 15.0, + close(c.temp, 1.0, 0.95).min(close(c.humidity, 0.0, 0.3)) * MUSH_FACT * 7.5, None, ) }), @@ -206,65 +206,54 @@ pub fn apply_scatter_to(canvas: &mut Canvas) { CONFIG.desert_hum, 0.2, )) * MUSH_FACT - * 0.1, + * 1.0, None, ) }), - /*(BarrelCactus, false, |c, col| { + (RoundCactus, false, |c, _| { ( close(c.temp, CONFIG.desert_temp + 0.2, 0.3).min(close( c.humidity, CONFIG.desert_hum, 0.2, )) * MUSH_FACT - * 0.1, + * 1.0, None, ) }), - (RoundCactus, false, |c, col| { + (ShortCactus, false, |c, _| { ( close(c.temp, CONFIG.desert_temp + 0.2, 0.3).min(close( c.humidity, CONFIG.desert_hum, 0.2, )) * MUSH_FACT - * 0.1, + * 1.0, None, ) }), - (ShortCactus, false, |c, col| { + (MedFlatCactus, false, |c, _| { ( close(c.temp, CONFIG.desert_temp + 0.2, 0.3).min(close( c.humidity, CONFIG.desert_hum, 0.2, )) * MUSH_FACT - * 0.1, + * 1.0, None, ) }), - (MedFlatCactus, false, |c, col| { + (ShortFlatCactus, false, |c, _| { ( close(c.temp, CONFIG.desert_temp + 0.2, 0.3).min(close( c.humidity, CONFIG.desert_hum, 0.2, )) * MUSH_FACT - * 0.1, + * 2.5, None, ) }), - (ShortFlatCactus, false, |c, col| { - ( - close(c.temp, CONFIG.desert_temp + 0.2, 0.3).min(close( - c.humidity, - CONFIG.desert_hum, - 0.2, - )) * MUSH_FACT - * 0.1, - None, - ) - }),*/ (Reed, false, |c, col| { ( close(c.humidity, CONFIG.jungle_hum, 0.7)