Skip to content
  • Ken Martin's avatar
    update and improve the coincident rendering code · 3052137e
    Ken Martin authored
    The old code used standard factor and offset values
    to handle coincident surface/line issues. There are known
    issue with that approach though. Halos on cones being one
    example when surfaces have a factor.
    
    This approach does not use a factor but instead only
    offsets. Unlike the previous offsets that were in zbuffer
    values, these offsets are in terms of view coordinates.
    The advantage being that as the zbuffer is non-linear the
    desired offset needs ot take that into account. By using
    view coordinates we take the non-linearity out of the
    equation. Specifically the offset is in terms of
    1/10000 of the diagonal of the actor. So an offset of 100
    would push back the zvalues by 1% of the actors bounding
    diagonal. Negative values pull zbuffer values closer to the
    viewer. The defaults are now 0 for surfaces, -4 for lines,
    and -8 for points. It is valuable to have 0 for surfaces
    as that means those fragments can use early z rejection
    as they are not modifying the z v...
    3052137e