diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-01-19 22:49:52 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-20 10:35:01 +0100 |
commit | 453f62c935a8c6b282d4a605dfd2007185d9e3d7 (patch) | |
tree | ac1a599921bb2566930a5d59c91664d02ad2f5a3 /Userland/Libraries/LibSoftGPU/Device.cpp | |
parent | 991cbc56a28a659613ad11039ef61d968d6769bb (diff) | |
download | serenity-453f62c935a8c6b282d4a605dfd2007185d9e3d7.zip |
LibGL+LibSoftGPU: Implement `GL_POLYGON_OFFSET_FILL` capability
Diffstat (limited to 'Userland/Libraries/LibSoftGPU/Device.cpp')
-rw-r--r-- | Userland/Libraries/LibSoftGPU/Device.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index 1268342006..444a3d365f 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -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) { |