godotengine / godotengine/godot

3D Particle shading is reversed when particle trails are turned on in Material

Open
#95,054 1 comment 0 reactions 0 assignees View on GitHub
bug topic:particles
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.