mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-12 01:25:55 +00:00
softgpu: Correct cull handling for sprites.
This commit is contained in:
parent
c1ce8383ae
commit
5fae2171cc
@ -206,7 +206,7 @@ void ProcessRect(const VertexData& v0, const VertexData& v1)
|
||||
VertexData* bottomleft = &buf[2];
|
||||
VertexData* bottomright = &buf[3];
|
||||
|
||||
// Um. Why is this stuff needed?
|
||||
// DrawTriangle always culls, so sort out the drawing order.
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (buf[i].screenpos.x < topleft->screenpos.x && buf[i].screenpos.y < topleft->screenpos.y)
|
||||
topleft = &buf[i];
|
||||
|
@ -237,8 +237,10 @@ bool RectangleFastPath(const VertexData &v0, const VertexData &v1) {
|
||||
bool coord_check =
|
||||
(xdiff == udiff || xdiff == -udiff) &&
|
||||
(ydiff == vdiff || ydiff == -vdiff);
|
||||
// Currently only works for TL/BR, which is the most common but not required.
|
||||
bool orient_check = xdiff >= 0 && ydiff >= 0;
|
||||
bool state_check = !gstate.isModeClear(); // TODO: Add support for clear modes in Rasterizer::DrawSprite.
|
||||
if ((coord_check || !gstate.isTextureMapEnabled()) && state_check) {
|
||||
if ((coord_check || !gstate.isTextureMapEnabled()) && orient_check && state_check) {
|
||||
Rasterizer::DrawSprite(v0, v1);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user