diff options
| author | Steven Fuller <relnev@icculus.org> | 2008-09-28 23:21:45 -0700 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:37 +0200 |
| commit | 4f2d3fe2c399602d228fb559cbab0e8326792d0a (patch) | |
| tree | f0870f9342ddecb8f9bc97861ab531c0dae732da /src/opengl.c | |
| parent | 0d6d5e545a2b57701942b2357be23cd2626f9abd (diff) | |
Tweaked polygon offset usage.
Tweaked the values used for glPolygonOffset, as the previous values
caused rendering issues with the fire in temple. The new values
probably reintroduce decal z-fighting with blood and bulletmarks, but
the fire z-fighting was a bigger issue.
Diffstat (limited to 'src/opengl.c')
| -rw-r--r-- | src/opengl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl.c b/src/opengl.c index 32a8ffc..e112ef2 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -513,9 +513,12 @@ void D3D_DecalSystem_Setup() pglDepthMask(GL_FALSE); - /* this does stop zfighting with bulletmarks on walls... */ + /* enable polygon offset to help lessen decal z-fighting... */ pglEnable(GL_POLYGON_OFFSET_FILL); - pglPolygonOffset(-8.0, -8.0); + + static GLfloat factor = 0.0f; + static GLfloat units = -100.0f; + pglPolygonOffset(factor, units); } void D3D_DecalSystem_End() |
