Skip to content

draw: improve numerical stability in clipper

Erik Faye-Lund requested to merge kusma/mesa:draw-clip-precision into main

Floats have much better precision close to zero than close to one, so let's make sure we compute an interpolation factor that goes in the direction that discards the fewest bits.

This makes a big difference when interpolating from very small to very large values for screen-space positions.

Merge request reports