Skip to content

ParticleProcessMaterial ignores the value set for particle_flag_damping_as_friction #84009

Closed
@cherriesandmochi

Description

Godot version

v4.2.beta3.official [e8d57af]

System information

Godot v4.2.beta3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 960 (NVIDIA; 31.0.15.3623) - Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz (4 Threads)

Issue description

ParticleProcessMaterial will always generate a shader that uses the realistic friction formula for damping, wheter 'particle_flag_damping_as_friction' has been enabled or not.
It's pretty safe to assume that the bug got introduced with #79527.
Additionally, the check for that very flag seems to be inverted:

if (!particle_flags[PARTICLE_FLAG_DAMPING_AS_FRICTION]) {

Steps to reproduce

  • Create a GPUParticles3D node.
  • Assign a new ParticleProcessMaterial to 'process_material'.
  • Convert the ParticleProcessMaterial to a ShaderMaterial
  • Open the shader and go to line 300 to see the "realistic friction" code, which shouldn't have been generated, as 'particle_flag_damping_as_friction' is disabled by default.

Minimal reproduction project

N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status

    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions