mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
VideoCommon: Move bounding box pixel quads rounding to shader
This avoids rounding values that the game writes to the bounding box registers, especially the default values.
This commit is contained in:
parent
37d0559493
commit
e4aef0a85b
3 changed files with 20 additions and 18 deletions
|
@ -187,18 +187,7 @@ void Renderer::ReinterpretPixelData(EFBReinterpretType convtype)
|
|||
|
||||
u16 Renderer::BBoxRead(int index)
|
||||
{
|
||||
u16 value = BBoxReadImpl(index);
|
||||
|
||||
// The GC/Wii GPU rasterizes in 2x2 pixel groups, so bounding box values will be rounded to the
|
||||
// extents of these groups, rather than the exact pixel.
|
||||
// This would have been handled in the pixel shader, but all attempts to do so did not work on
|
||||
// OpenGL/NVIDIA, due to presumably mystical driver behavior with atomics.
|
||||
if (index == 0 || index == 2)
|
||||
value &= ~1;
|
||||
else
|
||||
value |= 1;
|
||||
|
||||
return value;
|
||||
return BBoxReadImpl(index);
|
||||
}
|
||||
|
||||
void Renderer::BBoxWrite(int index, u16 value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue