Rotsuoy/savanna grass

This commit is contained in:
Rotsuoy 2021-01-23 07:46:54 +00:00 committed by Justin Shipsey
parent 9bc7ad453f
commit 212ee4b407
29 changed files with 173 additions and 6 deletions

View File

@ -185,7 +185,7 @@ void main() {
sin(tick.x * 1.5 + f_pos.y * 0.1) * sin(tick.x * 0.35),
sin(tick.x * 1.5 + f_pos.x * 0.1) * sin(tick.x * 0.25),
0.0
) * pow(abs(v_pos_.z/* + sprites[0].offs.z*/)/* * SCALE*/, 1.3) * /*0.2;*/SCALE_FACTOR;
) * 4 * v_pos_.z * /*0.2;*/SCALE_FACTOR;
}
// First 3 normals are negative, next 3 are positive

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -876,6 +876,148 @@ Fern: Some((
wind_sway: 0.4,
)),
// Savanna Flora
SavannaGrass: Some((
variations: [
(
model: "voxygen.voxel.sprite.grass.grass_savanna-0",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna-1",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna-2",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna-3",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna-4",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna-5",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna-6",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
],
wind_sway: 0.5,
)),
TallSavannaGrass: Some((
variations: [
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-0",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-1",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-2",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-3",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-4",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-5",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_tall-6",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
],
wind_sway: 0.8,
)),
RedSavannaGrass: Some((
variations: [
(
model: "voxygen.voxel.sprite.grass.grass_savanna_red-0",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_red-1",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_red-2",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.grass.grass_savanna_red-3",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
],
wind_sway: 0.8,
)),
SavannaBush: Some((
variations: [
(
model: "voxygen.voxel.sprite.savanna_bush.1",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.savanna_bush.2",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.savanna_bush.3",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.savanna_bush.4",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.savanna_bush.5",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
(
model: "voxygen.voxel.sprite.savanna_bush.6",
offset: (-6.0, -6.0, -0.0),
lod_axes: (1.0, 1.0, 1.0),
),
],
wind_sway: 0.1,
)),
// Dead Bush
DeadBush: Some((
variations: [

View File

@ -111,6 +111,10 @@ make_case_elim!(
FireBowlGround = 0x54,
CaveMushroom = 0x55,
Bowl = 0x56,
SavannaGrass = 0x57,
TallSavannaGrass = 0x58,
RedSavannaGrass = 0x59,
SavannaBush = 0x5A,
}
);

View File

@ -356,11 +356,7 @@ impl<V: RectRasterableVol> Terrain<V> {
let mut opaque_mesh = Mesh::new();
Meshable::<SpritePipeline, &mut GreedyMesh>::generate_mesh(
Segment::from(&model.read().0).scaled_by(lod_scale),
(
greedy,
&mut opaque_mesh,
wind_sway >= 0.4 && lod_scale_orig == 1.0,
),
(greedy, &mut opaque_mesh, false),
);
let model = renderer.create_model(&opaque_mesh).expect(
"Failed to upload sprite model data to the GPU!",

View File

@ -193,6 +193,31 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) {
Some((48.0, 0.2)),
)
}),
// Savanna Plants
(SavannaGrass, false, |c, _| {
(
close(c.temp, 1.0, 0.90).min(close(c.humidity, 0.2, 0.25)) * 0.015,
Some((45.0, 0.5)),
)
}),
(TallSavannaGrass, false, |c, _| {
(
close(c.temp, 1.0, 0.90).min(close(c.humidity, 0.2, 0.25)) * 0.15,
Some((45.0, 0.5)),
)
}),
(RedSavannaGrass, false, |c, _| {
(
close(c.temp, 1.0, 0.90).min(close(c.humidity, 0.2, 0.25)) * MUSH_FACT * 7.5,
None,
)
}),
(SavannaBush, false, |c, _| {
(
close(c.temp, 1.0, 0.90).min(close(c.humidity, 0.2, 0.25)) * MUSH_FACT * 7.5,
None,
)
}),
// Desert Plants
(DeadBush, false, |c, _| {
(