mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibGL+LibSoftGPU: Implement GL_POLYGON_OFFSET_FILL
capability
This commit is contained in:
parent
991cbc56a2
commit
453f62c935
4 changed files with 17 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue