From 484cc0e25525c2b555db418e07537b0f0fd7e214 Mon Sep 17 00:00:00 2001 From: "Mr. Ai" Date: Thu, 16 Oct 2025 04:18:42 -0400 Subject: [PATCH] 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 --- src/rmodels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rmodels.c b/src/rmodels.c index 3a5cc9004..3c904c396 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -3904,14 +3904,14 @@ void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector // Flip the content of the billboard while maintaining the counterclockwise edge rendering order if (size.x < 0.0f) { - source.x += size.x; + source.x -= size.x; source.width *= -1.0; right = Vector3Negate(right); origin.x *= -1.0f; } if (size.y < 0.0f) { - source.y += size.y; + source.y -= size.y; source.height *= -1.0; up = Vector3Negate(up); origin.y *= -1.0f;