-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
SDF generation demo not work on windows #497
Comments
Yes I think @DennisSmolek mentioned the same thing. I don't have access to a windows machine at the moment so any help or investigation into this would be great. |
I've actually been trying to get the example working on my local machine or a sandbox, If someone has the fix for that I'll get back on this grey box sdf thing.. |
How are you running the examples? It should be better documented / cleaned up but you'll want to run I'd like the get rid of the static-server component and just use |
I put this together for #491 which works on my Windows machines after disabling GPU generation (populating a |
@CodyJasonBennett haha I was going to post my fork of that too! If you flip the "surface" value positive you'll see that it goes dark immediately at the cube boundary, which is where the march approximation starts in the GPU version: I fiddled with things initially the other day and the render pass is still working correctly, but was having a hard time doing a comparison of GPU vs CPU as it has a pretty different setup/flow and not just because it's on the GPU... On the GPU it calls ThreeJS methods to add some lights.. Which the CPU version skips. // compute some basic lighting effects
vec3 lightDirection = normalize( vec3( 1.0 ) );
float lightIntensity =
saturate( dot( normal, lightDirection ) ) +
saturate( dot( normal, - lightDirection ) ) * 0.05 +0.1; So my newb brain cant workout if it's say a bad sample or the light is weird etc. It makes sense, the GPU would be faster/more powerful so add stuff, but on top of the Worker blocking a unbundled build I wasn't able to track down yet. I'm going to refactor a version of that sandbox and try to make the marching passes as basic and 1:1 so I can better follow where it might be breaking.. |
I stumbled onto this UnityLabs package and it seems we're all following the same guides.. Someone might swoop and and see the bug, but I'm confident I'll be able to work it out eventually! |
Here's a minimal recreation toggling between This is clearly an issue between my device and three.js so I'll do a little investigation and forward this over there. |
Admittedly our sample size is small, but the OP also a Windows user. as is the 2 others I talked with @N8python would be interesting to ask too, as they seems to be using the same boilerplate/logic for GPU Generate things and may have a work around.. |
As far as I understand N8 was not rendering directly into a 3d render target. This sounds like a platform issue, though. Does this happen on all browsers on windows? Or just Chrome? |
I can reproduce this on all browsers on Windows. Is there a way to have ANGLE choose Vulcan or some other backend? |
I'm not sure. Maybe it's worth opening a three.js issue with the minimal repro and the consider reporting to Chrome Bugzilla and maybe they can provide some more insight into where this is failing. |
@CodyJasonBennett you have the specifics, but we isolated the issue to problems with the renderTarget / 3D Texture. Seems it may be a higher up bug. There are work arounds but they are hacks. Problem on Chrome/Mac still exists (Onioning) |
A work-around would be to render each layer into a 2D render target and iteratively pipe it into a 3D data texture on the CPU. You can see the diff here: https://gist.github.com/CodyJasonBennett/b6172655dd8bcf5a4d11c556394c7210. This is used in practice with https://codesandbox.io/s/simondev-youtube-clouds-rn9kfx. I'm a bit burnt out right now, but I'll see if I can find time to report this downstream. |
In toggling the I'm going to try to take some steps to understand where this breaks, though, between the SDF example and working 2d array three.js example. |
This has been submitted to and acknowledged as a bug by Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=1411048 |
This is now working with #720 (comment). |
Screenshots
Platform:
Any windows machine is the same result
The text was updated successfully, but these errors were encountered: