diff options
author | clayjohn <claynjohn@gmail.com> | 2019-09-24 07:56:50 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2019-09-24 08:03:53 -0700 |
commit | bc94203addfddfab386878125d98c52765d489ad (patch) | |
tree | 39afc99ea4209b73d3e883cf9dd1c7e1d6138923 /scene/resources | |
parent | a1fcac640061c45e9dc55b1189e82aed3e2672fb (diff) |
fix particles scale randomization
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/particles_material.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index dc6ef2b49c..969743f78c 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -567,8 +567,8 @@ void ParticlesMaterial::_update_shader() { } } //scale by scale - code += " float base_scale = mix(scale * tex_scale, 1.0, scale_random * scale_rand);\n"; - code += " if (base_scale == 0.0) {\n"; + code += " float base_scale = tex_scale * mix(scale, 1.0, scale_random * scale_rand);\n"; + code += " if (base_scale < 0.000001) {\n"; code += " base_scale = 0.000001;\n"; code += " }\n"; if (trail_size_modifier.is_valid()) { |