소스 검색

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>
pull/5279/head
Mr. Ai 3 달 전
committed by GitHub
부모
커밋
484cc0e255
No known key found for this signature in database GPG 키 ID: B5690EEEBB952194
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/rmodels.c

+ 2
- 2
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;

불러오는 중...
취소
저장