godotengine / godotengine/godot
3D Particle shading is reversed when particle trails are turned on in Material
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
v4.2.2.stable.mono.official [15073afe3]
### System information
Godot v4.2.2.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 (NVIDIA; 32.0.15.5599) - AMD Ryzen 9 7950X3D 16-Core Processor (32 Threads)
### Issue description
I have set up a 3D GPU particle system which has trails enabled. The particle system uses a ribbon trail mesh. In the material on the trail mesh cull mode is set to "disable" so all sides of the ribbon render no matter from which direction the camera looks at it. I also have a directional light in my scene.
Now for trails to work properly, I need to enable "Use particle trails" in the material. This makes the trails render correctly. However now the particle shading is reversed, e.g. sides that face towards the directional light are now dark while sides that face away from it are now lit.
https://github.com/user-attachments/assets/ef57c6eb-b0e6-4816-9b77-fb521850e52e
### Steps to reproduce
In the attached sample project open `light_trails_test.tscn`. Then go to the material attached to the ribbon trail mesh and enable/disable _Transform_ -> _Use particle trails_.
### Minimal reproduction project (MRP)
[particle_reproducer.zip](https://github.com/user-attachments/files/16466504/particle_reproducer.zip)
Contributor guide
Assessment
This issue has not been assessed yet.