mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGL: Implement glPolygonOffset
This commit is contained in:
parent
7cbaaf8366
commit
15299b763c
Notes:
sideshowbarker
2024-07-18 04:54:11 +09:00
Author: https://github.com/sunverwerth
Commit: 15299b763c
Pull-request: https://github.com/SerenityOS/serenity/pull/9713
Reviewed-by: https://github.com/Quaker762 ✅
7 changed files with 26 additions and 1 deletions
|
@ -269,6 +269,9 @@ static void rasterize_triangle(const RasterizerOptions& options, Gfx::Bitmap& re
|
|||
|
||||
z = options.depth_min + (options.depth_max - options.depth_min) * (z + 1) / 2;
|
||||
|
||||
// FIXME: Also apply depth_offset_factor which depends on the depth gradient
|
||||
z += options.depth_offset_constant * NumericLimits<float>::epsilon();
|
||||
|
||||
bool pass = false;
|
||||
switch (options.depth_func) {
|
||||
case GL_ALWAYS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue