Sodium

Sodium

49M Downloads

Material downgrading causes Z-fighting on older Intel GPUs

jellysquid3 opened this issue ยท 1 comments

commented

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.

image

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.

commented

For the time being, it would be too much work to scan the entire block model. My patch set just disables the material downgrading functionality completely on Intel Gen8 (and older) GPUs.