1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 12:37:44 +00:00

LibGL+LibSoftGPU: Implement GL_POLYGON_OFFSET_FILL capability

This commit is contained in:
Jelle Raaijmakers 2022-01-19 22:49:52 +01:00 committed by Andreas Kling
parent 991cbc56a2
commit 453f62c935
4 changed files with 17 additions and 2 deletions

View file

@ -413,7 +413,8 @@ void Device::rasterize_triangle(const Triangle& triangle)
quad.depth = interpolate(vertex0.window_coordinates.z(), vertex1.window_coordinates.z(), vertex2.window_coordinates.z(), quad.barycentrics);
// FIXME: Also apply depth_offset_factor which depends on the depth gradient
quad.depth += m_options.depth_offset_constant * NumericLimits<float>::epsilon();
if (m_options.depth_offset_enabled)
quad.depth += m_options.depth_offset_constant * NumericLimits<float>::epsilon();
i32x4 depth_test_passed;
switch (m_options.depth_func) {