Godot Version
Godot v4.6.2.stable.mono
Question
I am reading the particle shader code converted from ParticleProcessMaterial attached to GPUParticles2D. If you fill AnimatedVelocity.VelocityLimit.velocity_limit_curve property before converting the material, then you will see the following code in the shader.
// NOTE: Shader automatically converted from Godot Engine 4.6.2.stable.mono's ParticleProcessMaterial.
shader_type particles;
render_mode disable_velocity;
// ...
void process() {
// ...
// Limit velocity.
if (length(final_velocity) > 0.001) {
final_velocity = normalize(final_velocity) * min(abs(length(final_velocity)), abs(texture(velocity_limit_curve, vec2(lifetime_ratio)).r));
}
// ...
}
I have thought that Curve in Godot can represent any curve which is possibly non-unit but textures can hold values only in the unit range 0.0 - 1.0. Am I missing something?