GPUTrail is a GPU-based trail plugin for Godot 4, offering an efficient alternative to CPU-based trails for creating ribbon trail effects in your games and applications.
addons/GPUTrail
folder into your Godot project's addons
folderGPUTrail3D
node to your sceneGPUTrail3D
node to the object you want to traillength
: Number of steps in the trailtexture
: Main texture of the trailcolor_ramp
: Color gradient along the trail's lengthcurve
: Width modulation along the trail's lengthvertical_texture
: Adjust texture orientationuse_red_as_alpha
: Use the red channel of the texture as alphabillboard
: Make the trail face the camera (experimental)dewiggle
: Improve texture mapping to the trailclip_overlaps
: Prevent trail self-intersectionissnap_to_transform
: Snap the trail start to the node's position, and regardless of the particles own frameratevar trail = GPUTrail3D.new()
trail.length = 100
trail.texture = preload("res://trail_texture.png")
add_child(trail)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.