mirror of
https://github.com/JaCzekanski/Avocado.git
synced 2024-05-20 12:57:38 -04:00
render: fixed rectangle texture x flip behaviour (gpu/texture-flip)
This commit is contained in:
parent
aa190fea15
commit
51f855ea0a
|
@ -29,15 +29,15 @@ INLINE void rasterizeRectangle(gpu::GPU* gpu, const primitive::Rect& rect) {
|
|||
gpu->maxDrawingY(pos.y + rect.size.y - 1) //
|
||||
);
|
||||
|
||||
const ivec2 uv( //
|
||||
ivec2 uv( //
|
||||
rect.uv.x + (min.x - pos.x), // Add offset if part of rectange was cut off
|
||||
rect.uv.y + (min.y - pos.y) //
|
||||
);
|
||||
int uStep = 1, vStep = 1;
|
||||
|
||||
// Texture flipping
|
||||
// TODO: Not tested!
|
||||
if (gpu->gp0_e1.texturedRectangleXFlip) {
|
||||
uv.x += 1;
|
||||
uStep = -1;
|
||||
}
|
||||
if (gpu->gp0_e1.texturedRectangleYFlip) {
|
||||
|
|
Loading…
Reference in a new issue