You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that USERDATA does not behave correctly when using GPUParticles3D's trail mode.
I have written to USERDATA1 in start() and read it in process() but cannot get the correct value.
It seemed to affect the initial value of the particle buffer.
Here is the Particle shader code.
shader_type particles;
void start() {
TRANSFORM = EMISSION_TRANSFORM;
CUSTOM =vec4(0.0);
VELOCITY =vec3(0.0, 10.0, 1.0);
USERDATA1.x =0.5;
}
void process() {
TRANSFORM[0][0] =1.0- USERDATA1.x; // this will be invalid data when the trail.
CUSTOM.x += DELTA;
if (CUSTOM.x > LIFETIME) {
ACTIVE = false;
}
}
Left: Trails is not correctly (X scale is 1.0 or invalid value)
Right: Particles is correctly (X scale is 0.5)
Tested versions
4.3.beta2
System information
Godot v4.3.beta2 - Windows 10.0.22631 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.12027.9001) - AMD Ryzen 9 6900HX with Radeon Graphics (16 Threads)
Issue description
I found that USERDATA does not behave correctly when using GPUParticles3D's trail mode.
I have written to
USERDATA1
instart()
and read it inprocess()
but cannot get the correct value.It seemed to affect the initial value of the particle buffer.
Here is the Particle shader code.
Left: Trails is not correctly (X scale is 1.0 or invalid value)
Right: Particles is correctly (X scale is 0.5)
Steps to reproduce
Minimal reproduction project (MRP)
bug_trails_using_userdata.zip
The text was updated successfully, but these errors were encountered: