mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Re-added oceans
This commit is contained in:
parent
6b415c1b87
commit
8e8bad137a
@ -164,7 +164,7 @@ impl<'a> BlockGen<'a> {
|
||||
.get((wposf.div(Vec3::new(150.0, 150.0, 150.0))).into_array())
|
||||
as f32)
|
||||
.mul((chaos - 0.1).max(0.0))
|
||||
.mul(115.0);
|
||||
.mul(96.0);
|
||||
|
||||
let height = if (wposf.z as f32) < alt + warp - 10.0 {
|
||||
// Shortcut cliffs
|
||||
@ -195,7 +195,7 @@ impl<'a> BlockGen<'a> {
|
||||
(alt + warp).max(cliff_height)
|
||||
};
|
||||
|
||||
(false, height, water_level + warp)
|
||||
(false, height, (water_level + warp).max(CONFIG.sea_level))
|
||||
};
|
||||
|
||||
// Sample blocks
|
||||
@ -395,8 +395,9 @@ impl<'a> ZCache<'a> {
|
||||
},
|
||||
) as f32;
|
||||
|
||||
let max =
|
||||
(self.sample.alt + cliff + structure + warp + 8.0).max(self.sample.water_level + 2.0);
|
||||
let max = (self.sample.alt + cliff + structure + warp + 8.0)
|
||||
.max(self.sample.water_level)
|
||||
.max(CONFIG.sea_level + 2.0);
|
||||
|
||||
(min, max)
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
.mul(0.5)
|
||||
.mul(24.0);
|
||||
|
||||
let water_level = (riverless_alt - 4.0 - 5.0 * chaos).max(CONFIG.sea_level);
|
||||
let water_level = riverless_alt - 4.0 - 5.0 * chaos;
|
||||
|
||||
let rock = (sim.gen_ctx.small_nz.get(
|
||||
Vec3::new(wposf.x, wposf.y, alt as f64)
|
||||
@ -103,8 +103,8 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
let warm_grass = Rgb::new(0.18, 0.65, 0.0);
|
||||
let cold_stone = Rgb::new(0.55, 0.7, 0.75);
|
||||
let warm_stone = Rgb::new(0.65, 0.65, 0.35);
|
||||
let beach_sand = Rgb::new(0.93, 0.84, 0.4);
|
||||
let desert_sand = Rgb::new(0.98, 0.8, 0.15);
|
||||
let beach_sand = Rgb::new(0.9, 0.85, 0.3);
|
||||
let desert_sand = Rgb::new(1.0, 0.7, 0.15);
|
||||
let snow = Rgb::broadcast(1.0);
|
||||
|
||||
let dirt = Lerp::lerp(Rgb::new(0.2, 0.1, 0.05), Rgb::new(0.4, 0.25, 0.0), marble);
|
||||
@ -115,7 +115,7 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
|
||||
let tropical = Rgb::lerp(
|
||||
grass,
|
||||
Rgb::new(0.95, 0.85, 0.1),
|
||||
Rgb::new(1.0, 0.75, 0.1),
|
||||
marble_small.sub(0.5).mul(0.05).add(0.3),
|
||||
);
|
||||
|
||||
@ -232,16 +232,17 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
cliff,
|
||||
snow,
|
||||
(alt - CONFIG.sea_level
|
||||
- 0.35 * CONFIG.mountain_scale
|
||||
- 0.4 * CONFIG.mountain_scale
|
||||
- alt_base
|
||||
- temp * 96.0
|
||||
- marble * 24.0)
|
||||
/ 12.0,
|
||||
),
|
||||
(alt - CONFIG.sea_level - 0.3 * CONFIG.mountain_scale + marble * 128.0) / 100.0,
|
||||
(alt - CONFIG.sea_level - 0.25 * CONFIG.mountain_scale + marble * 128.0)
|
||||
/ 100.0,
|
||||
),
|
||||
// Beach
|
||||
((alt - CONFIG.sea_level - 2.0) / 5.0).min(1.0 - river * 2.0),
|
||||
((alt - CONFIG.sea_level - 1.0) / 2.0).min(1.0 - river * 2.0),
|
||||
),
|
||||
sub_surface_color: dirt,
|
||||
tree_density,
|
||||
|
@ -351,7 +351,7 @@ impl SimChunk {
|
||||
.add(0.3)
|
||||
.max(0.0);
|
||||
|
||||
let temp = gen_ctx.temp_nz.get((wposf.div(15000.0)).into_array()) as f32;
|
||||
let temp = gen_ctx.temp_nz.get((wposf.div(12000.0)).into_array()) as f32;
|
||||
|
||||
let dryness = gen_ctx.dry_nz.get(
|
||||
(wposf
|
||||
@ -385,11 +385,9 @@ impl SimChunk {
|
||||
)
|
||||
.max(0.15);
|
||||
|
||||
let alt_base = gen_ctx.alt_nz.get((wposf.div(6_000.0)).into_array()) as f32;
|
||||
let alt_base = alt_base
|
||||
.mul(0.4)
|
||||
.add(alt_base.mul(128.0).sin().mul(0.005))
|
||||
.mul(400.0);
|
||||
let alt_base = (gen_ctx.alt_nz.get((wposf.div(12_000.0)).into_array()) as f32)
|
||||
.mul(250.0)
|
||||
.sub(25.0);
|
||||
|
||||
let alt_main = (gen_ctx.alt_nz.get((wposf.div(2_000.0)).into_array()) as f32)
|
||||
.abs()
|
||||
|
Loading…
Reference in New Issue
Block a user