mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
SoftGPU: Don't wrap negative positions.
Haven't fully verified this, but without this, Gods Eater Burst's bloom doesn't work, since -1,-1 maps to 1023,1023 so everything is clipped.
This commit is contained in:
parent
b2d3058386
commit
01076dd959
2 changed files with 7 additions and 7 deletions
|
@ -97,8 +97,8 @@ DrawingCoords TransformUnit::ScreenToDrawing(const ScreenCoords& coords)
|
|||
{
|
||||
DrawingCoords ret;
|
||||
// TODO: What to do when offset > coord?
|
||||
ret.x = (((u32)coords.x - gstate.getOffsetX16()) / 16) & 0x3ff;
|
||||
ret.y = (((u32)coords.y - gstate.getOffsetY16()) / 16) & 0x3ff;
|
||||
ret.x = ((s32)coords.x - gstate.getOffsetX16()) / 16;
|
||||
ret.y = ((s32)coords.y - gstate.getOffsetY16()) / 16;
|
||||
ret.z = coords.z;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -62,17 +62,17 @@ struct ScreenCoords
|
|||
struct DrawingCoords
|
||||
{
|
||||
DrawingCoords() {}
|
||||
DrawingCoords(u10 x, u10 y, u16 z) : x(x), y(y), z(z) {}
|
||||
DrawingCoords(s16 x, s16 y, u16 z) : x(x), y(y), z(z) {}
|
||||
|
||||
u10 x;
|
||||
u10 y;
|
||||
s16 x;
|
||||
s16 y;
|
||||
u16 z;
|
||||
|
||||
Vec2<u10> xy() const { return Vec2<u10>(x, y); }
|
||||
Vec2<s16> xy() const { return Vec2<s16>(x, y); }
|
||||
|
||||
DrawingCoords operator * (const float t) const
|
||||
{
|
||||
return DrawingCoords((u10)(x * t), (u10)(y * t), (u16)(z * t));
|
||||
return DrawingCoords((s16)(x * t), (s16)(y * t), (u16)(z * t));
|
||||
}
|
||||
|
||||
DrawingCoords operator + (const DrawingCoords& oth) const
|
||||
|
|
Loading…
Add table
Reference in a new issue