Skip to content

Commit

Permalink
fix: SG TrailData
Browse files Browse the repository at this point in the history
  • Loading branch information
deepkolos committed Mar 11, 2024
1 parent a1bb3f9 commit 3278eb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/TrailMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ uniform vec2 timeInfo; // currTime time
varying float vBirthTime;
vec2 uv; // SG使用
#ifndef BRUSH_DATA
#define BRUSH_DATA
#ifndef TRAIL_DATA
#define TRAIL_DATA
vec4 brushData;
float fraction;
#endif
#define SG_HEAD
void main() {
brushData = texture2D(brushDataTex, vec2(brushId / cursor.w, 0));
vBirthTime = brushData.w;
float fraction = (timeInfo.x - brushData.w) / timeInfo.y;
fraction = (timeInfo.x - brushData.w) / timeInfo.y;
uv = vec2(fraction, brushVertexId / brushVertexLen);
vec4 positionV4 = vec4(position, 1.0);
Expand Down

0 comments on commit 3278eb7

Please sign in to comment.