• Stefan Dösinger's avatar
    wined3d: Try to detect the polygon offset scale value. · 34d8b987
    Stefan Dösinger authored
    FEAR draws the same geometry twice, the second time using zfunc=equal.
    In both cases it sets a huge depth bias of -0.5, presumably to get
    better precision for the fragile Z comparison. The GL polygon offset we
    set ends up being so large that it pulls the geometry into the negative
    Z range. It isn't clipped (or no longer, older NV drivers probably had a
    separate bug there), but the Z value gets clamped to 0.0 in the first
    draw and doesn't match the incoming Z in the second draw.
    34d8b987
utils.c 217 KB