mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibSoftGPU: Reduce subpixel precision from 6 to 4 bits
With 6 bits of precision, the maximum triangle coordinate we can handle is sqrt(2^31 / (1 << 6)^2) = ~724. Rendering to a target of 800x600 or higher quickly becomes a mess because of integer overflow. By reducing the subpixel precision to 4 bits, we support coordinates up to ~2896, which means that we can (try to) render to target sizes like 2560x1440. This fixes the main menu backdrop for the Half-Life port. It also introduces more white pixel artifacts in Quake's water / lava rendering, but this is a level geometry visualization bug (see `r_novis`).
This commit is contained in:
parent
bac7a12fb9
commit
6dcc808994
Notes:
sideshowbarker
2024-07-17 07:12:44 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/6dcc808994 Pull-request: https://github.com/SerenityOS/serenity/pull/15227 Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/Smrtnyk ✅ Reviewed-by: https://github.com/sunverwerth ✅
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ static constexpr int MILLISECONDS_PER_STATISTICS_PERIOD = 500;
|
|||
static constexpr int NUM_LIGHTS = 8;
|
||||
static constexpr int MAX_CLIP_PLANES = 6;
|
||||
static constexpr float MAX_TEXTURE_LOD_BIAS = 2.f;
|
||||
static constexpr int SUBPIXEL_BITS = 6;
|
||||
static constexpr int SUBPIXEL_BITS = 4;
|
||||
|
||||
// See: https://www.khronos.org/opengl/wiki/Common_Mistakes#Texture_edge_color_problem
|
||||
// FIXME: make this dynamically configurable through ConfigServer
|
||||
|
|
Loading…
Reference in a new issue