Better lightning at distance

This commit is contained in:
Joshua Barretto 2022-07-09 02:08:55 +01:00
parent 836fe2b1c6
commit 6fea7205fa
2 changed files with 2 additions and 2 deletions

View File

@ -609,7 +609,7 @@ void main() {
vec3 start_off = vec3(abs(fract(vec3(vec2(z) * vec2(0.015, 0.01), 0)) - 0.5) * z * 0.5);
attr = Attr(
inst_dir * percent() + start_off,
vec3(16.0),
vec3(max(3.0, 0.05 * length(start_pos + inst_dir * percent()))),
vec4(10.0, 30.0, 50.0, 1.0),// * (1.0 - length(inst_dir) * 0.1),
identity()//spin_in_axis(perp_axis, asin(inst_dir.z / length(inst_dir)) + PI / 2.0)
);

View File

@ -63,7 +63,7 @@ impl ParticleMgr {
match outcome {
Outcome::Lightning { pos } => {
self.particles.resize_with(self.particles.len() + 500, || {
self.particles.resize_with(self.particles.len() + 800, || {
Particle::new_directed(
Duration::from_secs_f32(rng.gen_range(0.5..1.0)),
time,