-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
SSRPass: Change surfDist and infiniteThick behavior. #21539
SSRPass: Change surfDist and infiniteThick behavior. #21539
Conversation
871be05
to
c5a1418
Compare
That's an strange effect 🤔 |
In my opinion "infinitely thick" shouldn't be the default in the demo because I agree it causes some odd artifacts. Instead I think the demo should just allow for increasing the apparent "thickness" of the ray marched buffer (called "surfDist" in the example page) to a higher value. And in fact setting it to a very high value should have the same effect as setting the thickness to "infinite". Two more comments related to thickness:
|
Thanks @gkjohnson ! I also have some similar optimization ideas, but they are rather vague. Your suggestions make me more clear about what to do. Should let I'll do this first these days. |
Let
Removed
Realy solved the main reason of this issue, still a little bias need to investigate.
Suprisingly also partly solved this issue! EDIT: Introduced a new problem if only SSR😂, fine with groundReflector. |
43270be
to
1483183
Compare
Found that So in the end, not rename |
Thanks! |
I'm not 100% sure but it seems like the changes broke the e2e tests... https://github.com/mrdoob/three.js/runs/2358873732?check_suite_focus=true |
When I execute After submitting it yesterday, e2e test has also been in the checking state for a very long time, and was discovered that failed today.🤔 I'm trying change the code to let local always success. |
Also found that when run But works well in browsers ( Win10 chrome, Android Chrome, IOS safari ). |
This may be a SwiftShader issue? @c0d1f1ed we use SwiftShader in our e2e setup and the changes in this PR made this example hang the process: https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_postprocessing_ssr.html |
It's really hard to debug because this is a probability issue. And found the main reason is if(viewReflectRayZ-sD>vZ) continue; changed to if(viewReflectRayZ>vZ) continue; I tried if(viewReflectRayZ-.001>vZ) continue; but still hang, and here not need variable anymore. So tried if(viewReflectRayZ<=vZ){
bool hit;
#ifdef INFINITE_THICK...
#else...
#endif...
if(hit){...
}
} then OK. |
Seems continue commit to this merged pr has no effects. |
@mrdoob Thanks for alerting me about this. The Legacy SwiftShader OpenGL ES implementation unfortunately is known to have some bugs related to control flow in shaders. We're working on replacing it with the new SwiftShader Vulkan implementation, with the ANGLE project providing OpenGL ES compatibility for WebGL. This combo has no known shader bugs, so I'm hopeful it will also fix this issue. Is there a URL for the demo of the old PR that we can try? |
I think this URL should work: |
I can confirm that with Legacy SwiftShader, the page freezes when enabling the InfiniteThick feature. There also didn't appear to be any SSR effect. With the future "SwANGLE" solution, the page doesn't freeze and there's SSR going on. There is some other periodic artifact which appears to be either some geometry going off into infinity, or some of the reflection bleeding where it shouldn't. We'll try to look into that. |
Inspired by Blender Eevee SSR and SSRrPass's infiniteThick, changed SSRPass's infiniteThick behavior.
Demo
before vs after vs blender
---EDIT---
Newest Demo of this pr