Skip to content

Commit 484cc0e

Browse files
aixianshengViolently
andauthored
Fix DrawBillboardPro so that flipped images that are sampling from part of a larger texture still draw from the same source rectangle (#5276)
Co-authored-by: Violently <violently@violently.violently>
1 parent c6f9f76 commit 484cc0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/rmodels.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3904,14 +3904,14 @@ void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector
39043904
// Flip the content of the billboard while maintaining the counterclockwise edge rendering order
39053905
if (size.x < 0.0f)
39063906
{
3907-
source.x += size.x;
3907+
source.x -= size.x;
39083908
source.width *= -1.0;
39093909
right = Vector3Negate(right);
39103910
origin.x *= -1.0f;
39113911
}
39123912
if (size.y < 0.0f)
39133913
{
3914-
source.y += size.y;
3914+
source.y -= size.y;
39153915
source.height *= -1.0;
39163916
up = Vector3Negate(up);
39173917
origin.y *= -1.0f;

0 commit comments

Comments
 (0)