mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-11 05:58:44 +01:00
Use the size of the texture as the V scale so repeatable textures work well (#5463)
This commit is contained in:
@ -190,7 +190,7 @@ static void DrawTexturedCurve(void)
|
|||||||
Vector2 normal = Vector2Normalize((Vector2){ -delta.y, delta.x });
|
Vector2 normal = Vector2Normalize((Vector2){ -delta.y, delta.x });
|
||||||
|
|
||||||
// The v texture coordinate of the segment (add up the length of all the segments so far)
|
// The v texture coordinate of the segment (add up the length of all the segments so far)
|
||||||
float v = previousV + Vector2Length(delta);
|
float v = previousV + Vector2Length(delta) / (float)(texRoad.height * 2);
|
||||||
|
|
||||||
// Make sure the start point has a normal
|
// Make sure the start point has a normal
|
||||||
if (!tangentSet)
|
if (!tangentSet)
|
||||||
|
|||||||
Reference in New Issue
Block a user