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

Use interleaved gradient noise for distance fade #50297

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Jul 8, 2021

master version of #64052. Follow-up to #50294.

This provides better visuals and performance compared to the previous ordered dither. On my GTX 1080 in a 4K editor, I get 230 FPS in locations where I would get 210 FPS previously.

The new shader performs better since it has much less instructions and branching to do.

I also tested this PR on the 3.x branch together with #50294 and it works fine there, both in GLES3 and GLES2.

Preview

Note: These images should be viewed on a desktop device at 1:1 resolution by clicking them. Otherwise, they will not look as expected due to the nature of dithering.

Pixel Alpha (for comparison)

Pixel Alpha

Pixel Dither (new)

Pixel Dither

@Calinou Calinou added cherrypick:3.x Considered for cherry-picking into a future 3.x release enhancement topic:3d topic:rendering labels Jul 8, 2021
@Calinou Calinou added this to the 4.0 milestone Jul 8, 2021
@Calinou Calinou force-pushed the distance-fade-use-interleaved-gradient-noise branch from 5ae34d5 to 2e6791c Compare August 16, 2021 03:48
@reduz
Copy link
Member

reduz commented Aug 24, 2021

This looks great, but give me a bit more time before merging as I may need to do more changes in shadow mapping when I get some clues on the remaining bugs.

@akien-mga
Copy link
Member

Would be good to rebase to be safe.

This provides better visuals and performance compared to the previous
ordered dither.
@Calinou Calinou force-pushed the distance-fade-use-interleaved-gradient-noise branch from 2e6791c to e919e51 Compare August 5, 2022 09:41
@Calinou
Copy link
Member Author

Calinou commented Aug 5, 2022

Rebased and tested again, it works as expected.

@akien-mga akien-mga merged commit cc35a87 into godotengine:master Aug 5, 2022
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the distance-fade-use-interleaved-gradient-noise branch August 5, 2022 10:14
@Calinou Calinou removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants