fix particles rendering before water

revert changes to campfires -> Address in another MR!
This commit is contained in:
Monty Marz 2020-08-22 00:17:44 +02:00
parent ce929d2924
commit 8646c1add5
2 changed files with 9 additions and 9 deletions

View File

@ -109,19 +109,19 @@ void main() {
attr = Attr(
linear_motion(
vec3(0.0, 0.0, 0.0),
vec3(rand2 * 0.1, rand3 * 0.1, 1.0 + rand4 * 0.1)
vec3(rand2 * 0.02, rand3 * 0.02, 1.0 + rand4 * 0.1)
),
linear_scale(0.2),
vec4(1, 1, 1, start_end(0.1, 0.0)),
linear_scale(0.5),
vec4(1, 1, 1, start_end(1.0, 0.0)),
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 0.5)
);
} else if (inst_mode == FIRE) {
attr = Attr(
linear_motion(
vec3(rand0 * 0.3, rand1 * 0.3, 0.2),
vec3(rand1 * 0.1, rand3 * 0.1, 3.0 + rand4 * 1.2)
vec3(rand0 * 0.25, rand1 * 0.25, 0.3),
vec3(rand2 * 0.1, rand3 * 0.1, 2.0 + rand4 * 1.0)
),
1.3,
1.0,
vec4(2, 0.8 + rand5 * 0.3, 0, 1),
spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3)
);

View File

@ -1022,9 +1022,6 @@ impl Scene {
// Render the skybox.
renderer.render_skybox(&self.skybox.model, global, &self.skybox.locals, lod);
// Render particle effects.
self.particle_mgr.render(renderer, scene_data, global, lod);
self.terrain.render_translucent(
renderer,
global,
@ -1034,6 +1031,9 @@ impl Scene {
scene_data.sprite_render_distance,
);
// Render particle effects.
self.particle_mgr.render(renderer, scene_data, global, lod);
renderer.render_post_process(
&self.postprocess.model,
&global.globals,