-
Notifications
You must be signed in to change notification settings - Fork 3.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
Cesium does not work on Firefox 33 #2197
Comments
Also, both the forum poster and I are using the DirectX 9 ANGLE back-end. Someone should try this on a machine with the DirectX 11 back-end and see if it happens there. |
I can confirm Firefox 33 works on Mac. |
In case #2111 is part of the problem, can we test a version of Cesium prior this this, e.g., http://cesiumjs.org/releases/1.0/Apps/CesiumViewer/index.html |
I can confirm that Cesium 1.1 works, 1.2 does not. So I'm guessing it's definitely related to the linked issue. |
Although, I will mention that the test |
I suspect it is not the function itself, but the function plus the rest of the reprojection shader is causing the HLSL translator to generate incorrect code (e.g., because of global optimizations when the function is inlined). Give me a minute, I'll add some debug code. |
I've submitted two issues.
|
The branch debug-shaders uses WEBGL_debug_shaders to log the translated (e.g., GLSL to HLSL) shader source to the console when a program fails to compile or link. On Mac/Chrome, it returns an empty string. |
So some good news, I just downloaded Aurora (which is currently listed as Firefox 35) and both problems appears to be fixed. Unfortunately, the Firefox beta channel (which is still listed as 33) is not fixed. So it looks like the real question is when the fixed version will make it's way into stable. |
@pjcozzi unfortunately the debug-shaders branch just spits out the same thing as the unit test, |
Do you have this commit: 80fbb49 |
Yes, but |
Do you have We'll keep this debug code for our purposes, but, yes, we don't need it for this issue. |
Turns out I don't have |
You have to enable privileged extensions. about:config webgl.enable-privileged-extensions |
Thanks @shunter I had already figured that out but then got sidetracked. Trying it out now. |
Even after turning on everything and confirming the extension was there, I was still getting an empty string; then I realized it was because we were calling [GL] Translated fragment shader source
[GL] Translated vertex shader source
|
Fixed in 6955949. |
Since it's unclear if Firefox will be able to fix this in a timely manner, I am working on version-detecting the bad versions of Firefox and reverting to the previous code. |
The Firefox bug prevents shaders from compiling with the CORDIC algorithm, so we detect Firefox and fall back to the original algorithm. Issue #2197. The overall goal of the refactoring is to allow `#defines` to affect built-in functions, which was not possible before. In order to do this, we need the `#defines` to appear at the top of the source, so I've merged the procedural shader generation previously done in `ShaderProgram` with the generation done in `createShaderSource`. * `createShaderSource` (private) is removed and replaced by `ShaderSource`. `ShaderSource` now manages an array of `#defines`, concating source shaders, and automatically including built-in functions, keeping everything in the correct order. * `ShaderCache` (and by extension `Context.createShaderProgram` and `Context.replaceShaderProgram`) now accept either `ShaderSource` objects, or a single string, for vertex and fragment shaders. * `ShaderProgram` constructor (private) now takes an options object. It also exposes the vertex and fragment shaders as `ShaderSource` objects instead of strings. External code can still clone the `ShaderSources` and then screw around with the implementation to make new shaders procedurally, as `OIT` does.
@mramato if something changes with the Firefox bug you reported, and they end up backporting a fix, we can adjust the workaround. For now, FF 33 and 34 have it applied. |
Sounds like a plan. |
As reported on the forum, Cesium does not work with Firefox 33. The core of the problem is that the ImageryLayer reprojection shader fails to link. This can be scene by running Cesium Viewer or just the
Scene/ImageryLayer reprojects web mercator images.
test. I'm almost certain that this is an issue is ANGLE related because the test,Renderer/ShaderProgram has a struct uniform.
, is also broken; Chrome had a similar bug that we reported and had fixed a few releases ago: Chromium issue.Of course before we go pointing fingers, someone familiar with the reprojection code should have a look and make sure it's not something on our side that accidentally works on other browsers.
The text was updated successfully, but these errors were encountered: