ladybird/Userland/Libraries/LibSoftGPU
Jelle Raaijmakers 526390ec06 LibSoftGPU: Move back to i32-based subpixels
Our move to floating point precision has eradicated the pixel artifacts
in Quake 1, but introduced new and not so subtle rendering glitches in
games like Tux Racer. This commit changes three things to get the best
of both worlds:

1. Subpixel logic based on `i32` types was reintroduced, the number of
   bits is set to 6. This reintroduces the artifacts in Quake 1 but
   fixes rendering of Tux Racer.

2. Before triangle culling, subpixel coordinates are calculated and
   stored in `Triangle`. These coordinates are rounded, which fixes the
   Quake 1 artifacts. Tux Racer is unaffected.

3. The triangle area (actually parallelogram area) is also stored in
   `Triangle` so we don't need to recalculate it later on. In our
   previous subpixel code, there was a subtle disconnect between the
   two calculations (one with and one without subpixel precision) which
   resulted in triangles incorrectly being culled. This fixes some
   remaining Quake 1 artifacts.
2022-05-05 20:50:46 +02:00
..
Buffer LibSoftGPU: Apply regular cartesian coordinate system 2022-02-22 23:48:59 +00:00
AlphaBlendFactors.h LibSoftGPU: Move alpha blend factor setup out of triangle rasterization 2022-01-09 16:21:13 +03:30
Clipper.cpp LibSoftGPU: Simplify Clipper interpolation 2022-04-20 14:12:56 +02:00
Clipper.h LibSoftGPU: Optimize clipping code 2022-04-11 19:31:23 -07:00
CMakeLists.txt LibSoftGPU: Generalize pixel buffers and standardize on BGRA8888 2022-02-22 23:48:59 +00:00
Config.h LibSoftGPU: Move back to i32-based subpixels 2022-05-05 20:50:46 +02:00
Device.cpp LibSoftGPU: Move back to i32-based subpixels 2022-05-05 20:50:46 +02:00
Device.h LibSoftGPU: Move back to i32-based subpixels 2022-05-05 20:50:46 +02:00
Image.cpp LibSoftGPU: Use FloatVector4 pixel format for Image 2022-05-05 20:50:46 +02:00
Image.h LibSoftGPU: Use FloatVector4 pixel format for Image 2022-05-05 20:50:46 +02:00
PixelQuad.h LibSoftGPU: Move back to i32-based subpixels 2022-05-05 20:50:46 +02:00
Sampler.cpp LibGL+LibGPU+LibSoftGPU: Add virtual base class for Images 2022-04-06 11:32:24 +02:00
Sampler.h LibGL+LibGPU+LibSoftGPU: Move SamplerConfig to LibGPU 2022-04-06 11:32:24 +02:00
SIMD.h LibSoftGPU: Add log2_approximate() 2022-03-03 13:50:25 +01:00
Triangle.h LibSoftGPU: Move back to i32-based subpixels 2022-05-05 20:50:46 +02:00