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

Precision issue requiring SSR computation to bottom out as ssrDistanceMax increases. #846

Open
bryanedds opened this issue Aug 6, 2024 · 1 comment

Comments

@bryanedds
Copy link
Owner

The precision issue is currently worked around by using max(0.000001, ...) in this line of code -

currentDistanceView = -startView.z * -stopView.z / max(0.00001, mix(-stopView.z, -startView.z, currentProgressB)); // NOTE: uses perspective correct interpolation for depth, but causes precision issues as ssrDistanceMax increases.

You can see where it bottoms out the reflection computation here -

image

If we could find some way to preserve intended behavior without losing precision to the point of bottoming out, that should address this issue.

@bryanedds
Copy link
Owner Author

bryanedds commented Aug 6, 2024

Worked around this a bit by changing SSR config defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant