mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixing some colors.
This commit is contained in:
parent
d8c864cf3a
commit
c5ffb232d4
@ -140,7 +140,6 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
let temp = sim.get_interpolated(wpos, |chunk| chunk.temp)?;
|
||||
let dryness = sim.get_interpolated(wpos, |chunk| chunk.dryness)?;
|
||||
let humidity = sim.get_interpolated(wpos, |chunk| chunk.humidity)?;
|
||||
let humidity = if temp > CONFIG.desert_temp { CONFIG.desert_hum } else { humidity };
|
||||
let rockiness = sim.get_interpolated(wpos, |chunk| chunk.rockiness)?;
|
||||
let tree_density = sim.get_interpolated(wpos, |chunk| chunk.tree_density)?;
|
||||
let spawn_rate = sim.get_interpolated(wpos, |chunk| chunk.spawn_rate)?;
|
||||
@ -230,25 +229,12 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
marble_small.sub(0.5).mul(0.2).add(0.75).powf(0.667),
|
||||
);
|
||||
|
||||
// Case matrix (for now):
|
||||
// snow temp, desert humidity => rock
|
||||
// snow temp, forest humidity => dirt
|
||||
// snow temp, jungle humidity => snow
|
||||
// tropical temp, desert humidity => sand
|
||||
// tropical temp, forest humidity => grass
|
||||
// tropical temp, jungle humidity => tropical
|
||||
// desert temp, low altitude, desert humidity => sand
|
||||
// desert temp, high altitude, desert humidity => rock
|
||||
// desert temp, low altitude, forest humidity => moss
|
||||
// desert temp, high altitude, forest humidity => dirt
|
||||
// desert temp, low altitude, jungle humidity => dark grass
|
||||
// desert temp, high altitude, jungle humidity => mossy / maybe hot springs / dark grass
|
||||
|
||||
// For desert humidity, we are always sand or rock, depending on altitude.
|
||||
let ground = Rgb::lerp(sand, cliff, alt.sub(CONFIG.mountain_scale * 0.25));
|
||||
// At forest humidity, we go from dirt to grass to moss depending on temperature.
|
||||
// At forest humidity, we go from dirt to grass to moss to sand depending on temperature.
|
||||
let ground = Rgb::lerp(
|
||||
ground,
|
||||
Rgb::lerp(
|
||||
Rgb::lerp(
|
||||
Rgb::lerp(
|
||||
dirt,
|
||||
@ -260,11 +246,15 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
moss,
|
||||
temp.sub(CONFIG.tropical_temp).mul(32.0),
|
||||
),
|
||||
humidity.sub(CONFIG.desert_hum).mul(16.0)
|
||||
sand,
|
||||
temp.sub(CONFIG.desert_temp).mul(16.0),
|
||||
),
|
||||
humidity.sub(CONFIG.desert_hum).mul(4.0)
|
||||
);
|
||||
// At jungle humidity, we go from snow to tropical to moss.
|
||||
// At jungle humidity, we go from snow to tropical to moss to sand.
|
||||
let ground = Rgb::lerp(
|
||||
ground,
|
||||
Rgb::lerp(
|
||||
Rgb::lerp(
|
||||
Rgb::lerp(
|
||||
snow,
|
||||
@ -276,7 +266,10 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
moss,
|
||||
temp.sub(CONFIG.tropical_temp).mul(32.0),
|
||||
),
|
||||
humidity.sub(CONFIG.forest_hum)
|
||||
sand,
|
||||
temp.sub(CONFIG.desert_temp).mul(16.0),
|
||||
),
|
||||
humidity.sub(CONFIG.forest_hum).mul(4.0)
|
||||
);
|
||||
|
||||
/* let ground = Rgb::lerp(
|
||||
|
@ -545,11 +545,11 @@ impl SimChunk {
|
||||
}
|
||||
} else {
|
||||
// For now we don't take humidity into account for cold climates (but we really
|
||||
// should!).
|
||||
if temp > CONFIG.snow_temp {
|
||||
ForestKind::Pine
|
||||
} else {
|
||||
// should!) except that we make sure we only have snow pines when there is snow.
|
||||
if temp <= CONFIG.snow_temp && humidity > CONFIG.jungle_hum {
|
||||
ForestKind::SnowPine
|
||||
} else {
|
||||
ForestKind::Pine
|
||||
}
|
||||
},
|
||||
spawn_rate: 1.0,
|
||||
|
Loading…
Reference in New Issue
Block a user