-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Log Depth View Fix #9508
Log Depth View Fix #9508
Conversation
Thanks for the pull request @bkuster!
Reviewers, don't forget to make sure that:
|
Thanks for opening a PR @bkuster! I'm currently working on other parts of the code but this is on our radar 👍 |
Thanks for the feedback @ebogo1. You want me to spruce this up with some specs? or are you going to fix it in your PR? and is said PR already open? We can close this in favor of your development, as soon as your ready with it. |
Ah sorry if I was unclear - for something tricky like log depth we'd want to take a closer look later when we have more bandwidth to tackle changes to the code. Just wanted to let you know that we will return to your PR in the future 👍 |
Thanks again for your contribution @bkuster! No one has commented on this pull request in 90 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 90 days. If you'd like me to stop, just comment with |
Thanks again for your contribution @bkuster! No one has commented on this pull request in 90 days. Maintainers, can you review, merge or close to keep things tidy? I'm going to re-bump this in 90 days. If you'd like me to stop, just comment with |
} else {
curNear = Math.max(near, Math.pow(farToNearRatio, m) * near);
- curFar = farToNearRatio * curNear;
- if (!logDepth) {
- curFar = Math.min(far, curFar);
- }
+ curFar = Math.min(far, farToNearRatio * curNear);
} This code in #8850 clamps the far plane to the actual far plane as determined by the furthest draw command's bounding volume. Before, log depth would extend to the next multiple of the It would be good to know why this caused picking failures for billboards, and why increasing the far plane helps. @bkuster could you provide a minimal sandcastle example? If you don't have a sandcastle could you provide the options you use to create billboards? Also just to clarify - are you referring to |
I'm going to close this PR to keep things tidy. @bkuster, if you want to discuss further, I would suggest opening an issue. If there are further updates here, feel free to reopen. Thanks! |
Issue
After #8850 we had some erratic picking failures (especially for billboards). I broke it down to these lines:
Solution
This MR trys to fix this by clamping the far plane to the next log10 range.
Since my grasp on the subject is slight at best, maybe @IanLilleyT you could pitch in here, thanks.