If this is a 480i single buffer game, then rendering should complete within one vblank.
Therefore we should clear the depth buffer, because the drawing area may not change.
This is equivalent to the old 'True Color' mode.
The new 'True Color' mode truncates flat-shaded sprites/polygons
to 16-bit color before drawing. Doing so fixes:
- Menu background in Breath of Fire IV.
- Loading background in JumpStart Wildlife Safari - Field Trip.
- and other similar games.
Instead of clearing the entire buffer, we only need to wipe out the
current drawing area. Saves a decent chunk of memory bandwidth in games
that end up spamming clears.
If we use the shader here, we're going to immediately end the
render pass since the area we read and wrote to is going to be
dirty again.
This is problematic on Mali where the render passes are really
expensive. Test case: Dino Crisis 2 - open menu
The ordering is not correct otherwise. Ape Escape has a bunch of
overlapping sprites that have a mix of opaque and transparent texels,
and the transparent texels are repeated multiple times when the
opaque texels should cancel them out.
Only affects old Mali drivers.
- Simplify functions for rendering display.
- Post-processing should only when the target size matches the window.
Otherwise the shaders are constantly recompiled.
- Include border overlay in capture/screenshots when above condition
is satisfied.
- Relax video alignment size when using screen resolution + auto.
- Fix "Internal Resolution (Uncorrected)" capture mode.
What is this monstrosity? Final Fantasy VIII relies on X coordinates
being truncated during scanline drawing, with negative coordinates
becoming positive and vice versa. Fortunately the bits that we need
are consistent across the entire polygon, so we can get away with
truncating the vertices. However, we can't do this to all vertices,
because other game's vertices break in various ways. For example,
+1024 becomes -1024, which is a valid vertex position as the ending
coordinate is exclusive. Therefore, 1024 is never truncated, only
1023. Luckily, FF8's vertices get culled as they do not intersect
with the clip rectangle, so we can do this fixup only when culled,
and everything seems happy.
i.e. push all primitives through unless they are oversized, which the
GPU will definitely skip.
Needed because of coordinate truncation in Final Fantasy VIII, these
scenes will now render correctly with the software renderer again.
And only dump when the mask bit check is not enabled.
The replacements are gated by the mask bit check anyway, so there's
no point dumping anything that can't be replaced.