diff --git a/world/examples/water.rs b/world/examples/water.rs index cba3bc7250..61e031bd90 100644 --- a/world/examples/water.rs +++ b/world/examples/water.rs @@ -72,7 +72,6 @@ fn main() { sample_pos( config, sampler, - index, samples, uniform_idx_as_vec2(map_size_lg, posi), ) diff --git a/world/src/sim/map.rs b/world/src/sim/map.rs index e5f7d8c424..63384a1de3 100644 --- a/world/src/sim/map.rs +++ b/world/src/sim/map.rs @@ -1,7 +1,7 @@ use crate::{ column::ColumnSample, sim::{RiverKind, WorldSim}, - IndexRef, CONFIG, + CONFIG, }; use common::{ terrain::{ @@ -71,7 +71,6 @@ pub fn sample_wpos(config: &MapConfig, sampler: &WorldSim, wpos: Vec2) -> f pub fn sample_pos( config: &MapConfig, sampler: &WorldSim, - _index: IndexRef, samples: Option<&[Option]>, pos: Vec2, ) -> MapSample { @@ -102,8 +101,6 @@ pub fn sample_pos( river_kind, spline_derivative, is_path, - //_is_cave, - //_near_site, ) = sampler .get(pos) .map(|sample| { @@ -118,13 +115,6 @@ pub fn sample_pos( sample.river.river_kind, sample.river.spline_derivative, sample.path.0.is_way(), - // sample.cave.0.is_way(), - // sample.sites.iter().any(|site| { - // index.sites[*site] - // .get_origin() - // .distance_squared(pos * TerrainChunkSize::RECT_SIZE.x as i32) - // < 64i32.pow(2) - //}), ) }) .unwrap_or(( @@ -138,8 +128,6 @@ pub fn sample_pos( None, Vec2::zero(), false, - // false, - // false, )); let humidity = humidity.min(1.0).max(0.0); @@ -247,13 +235,9 @@ pub fn sample_pos( ), }; // TODO: Make principled. - let rgb = /*if near_site { - Rgb::new(0x57, 0x39, 0x33) - } else*/ if is_path { + let rgb = if is_path { Rgb::new(0x37, 0x29, 0x23) - } /* else if is_cave { - Rgb::new(0x37, 0x37, 0x37) - } */ else { + } else { rgb }; diff --git a/world/src/sim/mod.rs b/world/src/sim/mod.rs index a6b9f1f93b..d0beeefa2f 100644 --- a/world/src/sim/mod.rs +++ b/world/src/sim/mod.rs @@ -1476,7 +1476,7 @@ impl WorldSim { map_config.is_shaded = false; map_config.generate( - |pos| sample_pos(&map_config, self, index, Some(&samples_data), pos), + |pos| sample_pos(&map_config, self, Some(&samples_data), pos), |pos| sample_wpos(&map_config, self, pos), |pos, (r, g, b, _a)| { // We currently ignore alpha and replace it with the height at pos, scaled to