Browse Source
gl_rasterizer: Fix polygon offset units
For some reason hardware divides polygon offset units by two. This is
visible since drivers multiply the application requested polygon offset
by two.
pull/15/merge
ReinUsesLisp
6 years ago
No known key found for this signature in database
GPG Key ID: 2DFC508897B39CFE
1 changed files with
3 additions and
1 deletions
-
src/video_core/renderer_opengl/gl_rasterizer.cpp
|
|
@ -1340,7 +1340,9 @@ void RasterizerOpenGL::SyncPolygonOffset() { |
|
|
state.polygon_offset.fill_enable = regs.polygon_offset_fill_enable != 0; |
|
|
state.polygon_offset.fill_enable = regs.polygon_offset_fill_enable != 0; |
|
|
state.polygon_offset.line_enable = regs.polygon_offset_line_enable != 0; |
|
|
state.polygon_offset.line_enable = regs.polygon_offset_line_enable != 0; |
|
|
state.polygon_offset.point_enable = regs.polygon_offset_point_enable != 0; |
|
|
state.polygon_offset.point_enable = regs.polygon_offset_point_enable != 0; |
|
|
state.polygon_offset.units = regs.polygon_offset_units; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Hardware divides polygon offset units by two
|
|
|
|
|
|
state.polygon_offset.units = regs.polygon_offset_units / 2.0f; |
|
|
state.polygon_offset.factor = regs.polygon_offset_factor; |
|
|
state.polygon_offset.factor = regs.polygon_offset_factor; |
|
|
state.polygon_offset.clamp = regs.polygon_offset_clamp; |
|
|
state.polygon_offset.clamp = regs.polygon_offset_clamp; |
|
|
|
|
|
|
|
|
|