Skip to content

Commit 980e4d0

Browse files
authored
Use the size of the texture as the V scale so repeatable textures work well (#5463)
1 parent c9a456e commit 980e4d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/textures/textures_textured_curve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static void DrawTexturedCurve(void)
190190
Vector2 normal = Vector2Normalize((Vector2){ -delta.y, delta.x });
191191

192192
// The v texture coordinate of the segment (add up the length of all the segments so far)
193-
float v = previousV + Vector2Length(delta);
193+
float v = previousV + Vector2Length(delta) / (float)(texRoad.height * 2);
194194

195195
// Make sure the start point has a normal
196196
if (!tangentSet)

0 commit comments

Comments
 (0)