Material downgrading causes Z-fighting on older Intel GPUs
jellysquid3 opened this issue ยท 1 comments
Some older Intel GPUs (at least Gen7.5) are not handling the requested depth buffer behavior correctly. For certain block models with overlays where the base texture is opaque, this causes Z-fighting even when the vertex positions and camera transforms are identical.
Since this only affects cases where terrain geometry is overlapping with different materials, it is not necessary to completely disable the optimization on this hardware. We can instead scan the entire block model and find the lowest common denominator between each quad, allowing for downgrading to happen when the entire block model has alpha-tested or opaque geometry only.