fix draw_rect rotation
This commit is contained in:
parent
89560c2138
commit
9ba6849cf4
1 changed files with 4 additions and 4 deletions
|
@ -496,6 +496,10 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
|
||||||
src_rect.position + Vector2(0.0, src_rect.size.y),
|
src_rect.position + Vector2(0.0, src_rect.size.y),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (r->flags & CANVAS_RECT_TRANSPOSE) {
|
||||||
|
SWAP(uvs[1], uvs[3]);
|
||||||
|
}
|
||||||
|
|
||||||
if (r->flags & CANVAS_RECT_FLIP_H) {
|
if (r->flags & CANVAS_RECT_FLIP_H) {
|
||||||
SWAP(uvs[0], uvs[1]);
|
SWAP(uvs[0], uvs[1]);
|
||||||
SWAP(uvs[2], uvs[3]);
|
SWAP(uvs[2], uvs[3]);
|
||||||
|
@ -505,10 +509,6 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
|
||||||
SWAP(uvs[1], uvs[2]);
|
SWAP(uvs[1], uvs[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r->flags & CANVAS_RECT_TRANSPOSE) {
|
|
||||||
SWAP(uvs[1], uvs[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
|
state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size);
|
||||||
|
|
||||||
bool untile = false;
|
bool untile = false;
|
||||||
|
|
Loading…
Reference in a new issue