mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
526390ec06
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. |
||
---|---|---|
.. | ||
Buffer | ||
AlphaBlendFactors.h | ||
Clipper.cpp | ||
Clipper.h | ||
CMakeLists.txt | ||
Config.h | ||
Device.cpp | ||
Device.h | ||
Image.cpp | ||
Image.h | ||
PixelQuad.h | ||
Sampler.cpp | ||
Sampler.h | ||
SIMD.h | ||
Triangle.h |