diff --git a/voxygen/shaders/terrain.frag b/voxygen/shaders/terrain.frag index b45d545ae4..2c56dbf007 100644 --- a/voxygen/shaders/terrain.frag +++ b/voxygen/shaders/terrain.frag @@ -28,9 +28,9 @@ void main() { f_norm = vec3(0.0, 0.0, 1.0) * norm_dir; } - float glob_ambience = 0.001; + float glob_ambience = 0.0005; - float sun_ambience = 0.9; + float sun_ambience = 0.8; vec3 sun_dir = normalize(vec3(1.3, 1.7, 2.1)); diff --git a/voxygen/src/mesh/vol.rs b/voxygen/src/mesh/vol.rs index e07456c896..7223a46af7 100644 --- a/voxygen/src/mesh/vol.rs +++ b/voxygen/src/mesh/vol.rs @@ -53,7 +53,7 @@ fn create_quad, Vec3, Rgb) -> P::Vertex>( let ao_scale = 0.95; let dark = col * (1.0 - ao_scale); - let ao_map = ao.map(|e| e.powf(1.5)); + let ao_map = ao.map(|e| 0.15 + e.powf(2.0) * 0.85); if ao[0].min(ao[2]) < ao[1].min(ao[3]) { Quad::new( diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index 0d8f6014d4..429c221d17 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -107,7 +107,7 @@ impl<'a> Sampler for BlockGen<'a> { let water = Block::new(1, Rgb::new(100, 150, 255)); let warm_stone = Block::new(1, Rgb::new(165, 165, 130)); - let block = if (wposf.z as f32) < height - 2.0 { + let block = if (wposf.z as f32) < height - 3.0 { // Underground if (wposf.z as f32) > alt { Some(surface_stone) diff --git a/world/src/config.rs b/world/src/config.rs index 1d7238db35..3e5d801e42 100644 --- a/world/src/config.rs +++ b/world/src/config.rs @@ -4,6 +4,6 @@ pub struct Config { } pub const CONFIG: Config = Config { - sea_level: 128.0, + sea_level: 140.0, mountain_scale: 1200.0, }; diff --git a/world/src/sim/location.rs b/world/src/sim/location.rs new file mode 100644 index 0000000000..fb02b051d4 --- /dev/null +++ b/world/src/sim/location.rs @@ -0,0 +1 @@ +pub struct Location; diff --git a/world/src/sim/mod.rs b/world/src/sim/mod.rs index 38bd431fa2..19c999a2bf 100644 --- a/world/src/sim/mod.rs +++ b/world/src/sim/mod.rs @@ -1,4 +1,9 @@ -use std::ops::{Add, Div, Mul, Neg, Sub}; +mod location; + +use std::{ + ops::{Add, Div, Mul, Neg, Sub}, + sync::Arc, +}; use vek::*; use noise::{ BasicMulti, RidgedMulti, SuperSimplex, HybridMulti, @@ -12,6 +17,7 @@ use crate::{ CONFIG, util::StructureGen2d, }; +use self::location::Location; pub const WORLD_SIZE: Vec2 = Vec2 { x: 1024, y: 1024 }; @@ -73,11 +79,19 @@ impl WorldSim { } } - Self { + let mut this = Self { seed, chunks, gen_ctx, - } + }; + + this.simulate(100); + + this + } + + pub fn simulate(&mut self, cycles: usize) { + // TODO } pub fn get(&self, chunk_pos: Vec2) -> Option<&SimChunk> { @@ -152,6 +166,7 @@ pub struct SimChunk { pub rockiness: f32, pub cliffiness: f32, pub tree_density: f32, + pub location: Option>, } impl SimChunk { @@ -222,6 +237,7 @@ impl SimChunk { .mul(1.0 - chaos * 0.85) .add(0.1) .mul(if alt > CONFIG.sea_level + 2.0 { 1.0 } else { 0.0 }), + location: None, } }