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

Clipping Planes sandcastle examples show errors in IE #6575

Closed
likangning93 opened this issue May 8, 2018 · 6 comments
Closed

Clipping Planes sandcastle examples show errors in IE #6575

likangning93 opened this issue May 8, 2018 · 6 comments

Comments

@likangning93
Copy link
Contributor

likangning93 commented May 8, 2018

... but the demos don't actually crash? This seems to be limited to demos that involve Model.js, so instanced and b3dm tilesets as well as 3D models.

https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=3D%20Tiles%20Clipping%20Planes.html

@likangning93
Copy link
Contributor Author

In Sandcastle:

[Cesium WebGL] Shader program link log: Internal linking error

RuntimeError: Program failed to link.  Link log: Internal linking error

Error
   at RuntimeError (http://localhost:8080/Source/Core/RuntimeError.js:42:13)
   at createAndLinkProgram (http://localhost:8080/Source/Renderer/ShaderProgram.js:257:13)
   at initialize (http://localhost:8080/Source/Renderer/ShaderProgram.js:451:9)
   at ShaderProgram.prototype._bind (http://localhost:8080/Source/Renderer/ShaderProgram.js:468:9)
   at beginDraw (http://localhost:8080/Source/Renderer/Context.js:939:9)
   at Context.prototype.draw (http://localhost:8080/Source/Renderer/Context.js:1002:9)
   at DrawCommand.prototype.execute (http://localhost:8080/Source/Renderer/DrawCommand.js:502:9)
   at executeCommand (http://localhost:8080/Source/Scene/Scene.js:2075:13)
   at executeCommands (http://localhost:8080/Source/Scene/Scene.js:2403:17)
   at executeCommandsInViewport (http://localhost:8080/Source/Scene/Scene.js:2762:9) (on line 257 of http://localhost:8080/Source/Renderer/ShaderProgram.js)

Funny thing, running this in a separate tab once triggered Windows to ask if I'd like to use the Visual Studio debugger... that "internal linking error" thing also suggests to me that something deeeeep in the browser is dying...

@likangning93
Copy link
Contributor Author

likangning93 commented May 11, 2018

limited to demos that involve Model.js

Another observation, removing the discard here gets rid of the problem, but... I mean... it also gets rid of the clipping which defeats the purpose.

I panicked for a second and thought maybe discard just doesn't work in IE anymore but terrain and pnts don't have a problem, so it's probably something in the model shader.

[EDIT] it seems to be the picking shader specifically that has problems... sliding planes around without possibly touching the model seems to work

@likangning93
Copy link
Contributor Author

likangning93 commented May 11, 2018

Tried to git bisect, it looks like this emerged in 1635c92 when master with texture clipping planes (and IE clipping planes for the first time) got merged into log depth.

Except IE doesn't even support log depth anyway. Interesting...

@likangning93
Copy link
Contributor Author

I think I have a fix, but a few more observations:

  • removing the gl_FragColor write for the clipping plane edge style prevents the error for regular 3D models but not for all 3D Tilesets
  • removing modifications for log depth on picking shaders seems to fix everything. Again, this is IE so log depth isn't supported anyway.

I wonder if we're actually looking at multiple quirks in IE's webgl implementation... I know that we've run into weird discard problems before on DirectX-based webgl, like calling discard from inside a loop. In this case maybe it's just the sheer amount of indirection, even though a lot of that indirection in this case isn't actually doing anything.

@flyingsnowers
Copy link

I think I have a fix, but a few more observations:

  • removing the gl_FragColor write for the clipping plane edge style prevents the error for regular 3D models but not for all 3D Tilesets
  • removing modifications for log depth on picking shaders seems to fix everything. Again, this is IE so log depth isn't supported anyway.

I wonder if we're actually looking at multiple quirks in IE's webgl implementation... I know that we've run into weird discard problems before on DirectX-based webgl, like calling discard from inside a loop. In this case maybe it's just the sheer amount of indirection, even though a lot of that indirection in this case isn't actually doing anything.

I think I have a fix, but a few more observations:

  • removing the gl_FragColor write for the clipping plane edge style prevents the error for regular 3D models but not for all 3D Tilesets
  • removing modifications for log depth on picking shaders seems to fix everything. Again, this is IE so log depth isn't supported anyway.

I wonder if we're actually looking at multiple quirks in IE's webgl implementation... I know that we've run into weird discard problems before on DirectX-based webgl, like calling discard from inside a loop. In this case maybe it's just the sheer amount of indirection, even though a lot of that indirection in this case isn't actually doing anything.

may i ask how to fix this problem?

@OmarShehata
Copy link
Contributor

@flyingsnowers this should be fixed now. Are you running into any errors? I was able to run the clipping planes code example in IE 11 with no WebGL errors.

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

4 participants