Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dither #159

Merged
merged 2 commits into from
Mar 19, 2025
Merged

Fix Dither #159

merged 2 commits into from
Mar 19, 2025

Conversation

JusGu
Copy link
Contributor

@JusGu JusGu commented Mar 18, 2025

This PR attempts to fix: #118

I honestly don't fully understand why this issue only occurred on Mac and not windows but I suspect it has to do with the handling of floating‑point math/ integer conversion. I also unfortunately don't fully understand why this solution works (on a high level, I changed the way the UV pixel was calculated and messed around with the colors until they resembled the original effect) but the you're free to play around with this code.

I was able to reproduce this bug on my Mac with Intel chip which suggests this bug wasn't only on Windows devices. I fixed the bug locally on the same device, I heavily suggest testing this on a Windows device first.

Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
react-bits-ui ⬜️ Ignored (Inspect) Visit Preview Mar 18, 2025 11:06pm

@DavidHDev
Copy link
Owner

Hello @JusGu , really happy to see this PR, thanks a lot!

I've tested it on Windows and my Mac, and it seems to fix the issues with the shader artifacts and the flickering

@DavidHDev DavidHDev merged commit 4ed3564 into DavidHDev:main Mar 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: backgrounds/dither rendering issue on some devices
2 participants