From d312ce46dcbcaccdf7b67c641b35b00d7edd5b69 Mon Sep 17 00:00:00 2001 From: zhuxudong Date: Fri, 8 Aug 2025 16:45:54 +0800 Subject: [PATCH] fix particle function error (#2797) --- .../shaderlib/particle/rotation_over_lifetime_module.glsl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/shaderlib/particle/rotation_over_lifetime_module.glsl b/packages/core/src/shaderlib/particle/rotation_over_lifetime_module.glsl index 4b6cd1e82..44b9b6b86 100644 --- a/packages/core/src/shaderlib/particle/rotation_over_lifetime_module.glsl +++ b/packages/core/src/shaderlib/particle/rotation_over_lifetime_module.glsl @@ -23,9 +23,10 @@ float computeParticleRotationFloat(in float rotation, in float age, in float normalizedAge) { #if defined(RENDERER_ROL_CONSTANT_MODE) || defined(RENDERER_ROL_CURVE_MODE) #ifdef RENDERER_ROL_CURVE_MODE - float lifeRotation = evaluateParticleCurveCumulative(renderer_ROLMaxCurveZ, normalizedAge); + float currentValue; + float lifeRotation = evaluateParticleCurveCumulative(renderer_ROLMaxCurveZ, normalizedAge, currentValue); #ifdef RENDERER_ROL_IS_RANDOM_TWO - lifeRotation = mix(evaluateParticleCurveCumulative(renderer_ROLMinCurveZ, normalizedAge), lifeRotation, a_Random0.w); + lifeRotation = mix(evaluateParticleCurveCumulative(renderer_ROLMinCurveZ, normalizedAge, currentValue), lifeRotation, a_Random0.w); #endif rotation += lifeRotation * a_ShapePositionStartLifeTime.w; #else