From a1bb3f99ff08cfb43cdceb537299c38197a73974 Mon Sep 17 00:00:00 2001 From: deepkolos Date: Mon, 11 Mar 2024 17:10:58 +0800 Subject: [PATCH] fix: trail uv fraction --- src/TrailMaterial.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TrailMaterial.ts b/src/TrailMaterial.ts index ba7d952..7e40b30 100644 --- a/src/TrailMaterial.ts +++ b/src/TrailMaterial.ts @@ -34,8 +34,8 @@ vec2 uv; // SG使用 void main() { brushData = texture2D(brushDataTex, vec2(brushId / cursor.w, 0)); - float fraction = (timeInfo.x - brushData.w) / (timeInfo.y * (cursor.z / cursor.w)); vBirthTime = brushData.w; + float fraction = (timeInfo.x - brushData.w) / timeInfo.y; uv = vec2(fraction, brushVertexId / brushVertexLen); vec4 positionV4 = vec4(position, 1.0);