# Flaky rendering

Deal with false-positive visual diffs caused by rendering noise - antialiasing, shadows, and rounded corners - by tuning the diff threshold.

Sometimes a session reports differences that aren't real changes. Rendering is not perfectly deterministic: antialiasing on rounded corners, subpixel text rendering, and soft shadows can vary slightly between runs. These show up as thin, scattered diffs along edges and text - visually identical to a human, different pixel-by-pixel.

## Raise the threshold

The **Threshold / diff sensitivity** setting in the [suite settings](/docs/tests/visual-tests/suite-settings.md) controls how much difference is tolerated before a snapshot is flagged as changed. The default is `0.3`; a threshold of `0` reports every pixel difference.

If your sessions keep flagging visually identical snapshots:

1. Open a few of the flagged diffs and confirm the highlighted areas are only edges, corners, shadows, or text antialiasing
2. Increase the threshold gradually and rerun the session
3. Stop as soon as the noise disappears

Keep the threshold as low as you can - a high value that silences noise can also hide small real regressions, like a 1px border change. If only a single problematic view is affected, override the threshold on that snapshot rather than raising it for the whole suite.

## If the diff area is larger

Whole blocks lighting up on every run usually aren't rendering noise:

- dynamic or animated content → [Dynamic Content](/docs/tests/visual-tests/troubleshooting/dynamic-content.md)
- content still loading when the capture happens → [Lazy loading](/docs/tests/visual-tests/troubleshooting/lazy-loading.md)


---
Original source: https://buddy.works/docs/tests/visual-tests/troubleshooting/flaky-rendering