mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:47:45 +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) {
|
||||
|
|
|
@ -66,6 +66,7 @@ struct RasterizerOptions {
|
|||
bool enable_color_write { true };
|
||||
float depth_offset_factor { 0 };
|
||||
float depth_offset_constant { 0 };
|
||||
bool depth_offset_enabled { false };
|
||||
bool enable_culling { false };
|
||||
WindingOrder front_face { WindingOrder::CounterClockwise };
|
||||
bool cull_back { true };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue