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

Cesium does not work on Firefox 33 #2197

Closed
mramato opened this issue Oct 15, 2014 · 21 comments
Closed

Cesium does not work on Firefox 33 #2197

mramato opened this issue Oct 15, 2014 · 21 comments

Comments

@mramato
Copy link
Contributor

mramato commented Oct 15, 2014

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.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

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.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

I can confirm Firefox 33 works on Mac.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

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

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

I can confirm that Cesium 1.1 works, 1.2 does not. So I'm guessing it's definitely related to the linked issue.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

Although, I will mention that the test has czm_cosineAndSine in all 4 quadrants passes, which is odd.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

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.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

I've submitted two issues.

  1. https://bugzilla.mozilla.org/show_bug.cgi?id=1083178 which is the showstopping issue causing Cesium to break.
  2. https://bugzilla.mozilla.org/show_bug.cgi?id=1083168 which is the unnamed struct issue (that is unimportant to Cesium right now but is a genuine separate bug).

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

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.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

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.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

@pjcozzi unfortunately the debug-shaders branch just spits out the same thing as the unit test, [GL] Shader program link log: Failed to create D3D shaders.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

Do you have this commit: 80fbb49

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

Yes, but debugShaders is undefined so the message never gets printed. I'll hack it up to spit it out, but since it's already fixed in Aurora, I'm not sure it will be needed.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

Do you have WEBGL_debug_shaders? http://webglreport.com/

We'll keep this debug code for our purposes, but, yes, we don't need it for this issue.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

Turns out I don't have WEBGL_debug_shaders

@shunter
Copy link
Contributor

shunter commented Oct 15, 2014

You have to enable privileged extensions.

about:config

webgl.enable-privileged-extensions

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

Thanks @shunter I had already figured that out but then got sidetracked. Trying it out now.

@mramato
Copy link
Contributor Author

mramato commented Oct 15, 2014

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.deleteProgram(program); before calling debugShaders.getTranslatedShaderSource. Deleting the shader should probably be the last thing we do before the throw. Moving it down fixed it and here are the results.

[GL] Translated fragment shader source

uniform lowp sampler2D webgl_13729c4aca6aa1ca;
varying highp vec2 webgl_3e73f85b52e0b74b;
void main(){
(gl_FragColor = texture2D(webgl_13729c4aca6aa1ca, webgl_3e73f85b52e0b74b));
}

[GL] Translated vertex shader source

highp vec2 webgl_753fc4eceb4b9c46(in highp float webgl_1a32f0ee95ba41f7){
highp vec2 webgl_fa570f9e6bfcbdb2 = vec2(0.60725296, 0.0);
highp float webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0));
highp mat2 webgl_cab57807b47886f4 = mat2(1.0, webgl_c61a8815e4ae4874, (-webgl_c61a8815e4ae4874), 1.0);
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.78539819));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
highp float webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.5);
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.4636476));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.25));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.24497867));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.125));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.124355));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.0625));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.062418811));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.03125));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.031239834));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.015625));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.015623729));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.0078125));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.0078123412));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.00390625));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.0039062302));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.001953125));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.0019531226));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.0009765625));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.00097656221));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.00048828125));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.00048828122));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.00024414063));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.00024414063));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 0.00012207031));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 0.00012207031));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 6.1035156e-005));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 6.1035156e-005));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 3.0517578e-005));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 3.0517578e-005));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 1.5258789e-005));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 1.5258789e-005));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 7.6293945e-006));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 7.6293945e-006));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 3.8146973e-006));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 3.8146973e-006));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 1.9073486e-006));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 1.9073486e-006));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 9.5367432e-007));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 9.5367432e-007));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 4.7683716e-007));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 4.7683716e-007));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 2.3841858e-007));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
(webgl_1a32f0ee95ba41f7 -= (webgl_c61a8815e4ae4874 * 2.3841858e-007));
(webgl_c61a8815e4ae4874 = (((webgl_1a32f0ee95ba41f7 < 0.0)) ? (-1.0) : (1.0)));
(webgl_cea790c47c13d93a = (webgl_c61a8815e4ae4874 * 1.1920929e-007));
(webgl_cab57807b47886f4[0][1] = webgl_cea790c47c13d93a);
(webgl_cab57807b47886f4[1][0] = (-webgl_cea790c47c13d93a));
(webgl_fa570f9e6bfcbdb2 = (webgl_cab57807b47886f4 * webgl_fa570f9e6bfcbdb2));
return webgl_fa570f9e6bfcbdb2;
}
highp vec2 webgl_ad7cce9eaafb0f5f(in highp float webgl_1a32f0ee95ba41f7){
if (((webgl_1a32f0ee95ba41f7 < -1.5707964) || (webgl_1a32f0ee95ba41f7 > 1.5707964)))
{
if ((webgl_1a32f0ee95ba41f7 < 0.0))
{
return (-webgl_753fc4eceb4b9c46((webgl_1a32f0ee95ba41f7 + 3.1415927)));
}
else
{
return (-webgl_753fc4eceb4b9c46((webgl_1a32f0ee95ba41f7 - 3.1415927)));
}
}
else
{
return webgl_753fc4eceb4b9c46(webgl_1a32f0ee95ba41f7);
}
}
uniform highp mat4 webgl_29eaa369b74c9d67;
highp float webgl_3c0689a9cd9019a1(in highp float webgl_9d6a83b9dac02809, in highp float webgl_2391c640874bc111, in highp float webgl_77aad05e1be718c, in highp float webgl_10173ce2d35a2a8a){
highp float webgl_fcdcd62123a4c039 = webgl_ad7cce9eaafb0f5f(webgl_9d6a83b9dac02809).y;
highp float webgl_6cadf68bc36d899a = (0.5 * log(((1.0 + webgl_fcdcd62123a4c039) / (1.0 - webgl_fcdcd62123a4c039))));
highp float webgl_7a95aed20c85a4c5 = (0.0 - webgl_2391c640874bc111);
highp float webgl_b0e801079af5bb56 = (webgl_7a95aed20c85a4c5 - 0.0);
highp float webgl_11f2b30f3c4917a8 = (((((-webgl_2391c640874bc111) - webgl_b0e801079af5bb56) + (0.0 - (webgl_7a95aed20c85a4c5 - webgl_b0e801079af5bb56))) + webgl_6cadf68bc36d899a) - webgl_77aad05e1be718c);
highp float webgl_5bd6fb5eaf2fb6fe = (webgl_7a95aed20c85a4c5 + webgl_11f2b30f3c4917a8);
highp float webgl_11bf27a58cf43feb = (webgl_11f2b30f3c4917a8 - (webgl_5bd6fb5eaf2fb6fe - webgl_7a95aed20c85a4c5));
return ((webgl_5bd6fb5eaf2fb6fe * webgl_10173ce2d35a2a8a) + (webgl_11bf27a58cf43feb * webgl_10173ce2d35a2a8a));
}
attribute highp vec4 webgl_fa67bdd9ecec0ae;
uniform highp vec2 webgl_c0d379ea81edfd3a;
uniform highp float webgl_2fcccf762909f5be;
uniform highp float webgl_af0f43a74b507fdf;
uniform highp float webgl_8d9abac549949f4;
uniform highp float webgl_bd73348023d62e5b;
uniform highp float webgl_872bac4d47476778;
varying highp vec2 webgl_3e73f85b52e0b74b;
void main(){
highp float webgl_fe347cbf1dcd7627 = mix(webgl_af0f43a74b507fdf, webgl_2fcccf762909f5be, webgl_fa67bdd9ecec0ae.y);
highp float webgl_6816429c38d94138 = webgl_3c0689a9cd9019a1(webgl_fe347cbf1dcd7627, webgl_bd73348023d62e5b, webgl_8d9abac549949f4, webgl_872bac4d47476778);
(webgl_3e73f85b52e0b74b = vec2(webgl_fa67bdd9ecec0ae.x, webgl_6816429c38d94138));
(gl_Position = (webgl_29eaa369b74c9d67 * (webgl_fa67bdd9ecec0ae * vec4(webgl_c0d379ea81edfd3a, 1.0, 1.0))));
}

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 15, 2014

Fixed in 6955949.

@shunter
Copy link
Contributor

shunter commented Oct 22, 2014

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.

shunter added a commit that referenced this issue Oct 22, 2014
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.
@pjcozzi pjcozzi closed this as completed Oct 23, 2014
shunter added a commit that referenced this issue Oct 23, 2014
@shunter
Copy link
Contributor

shunter commented Oct 23, 2014

@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.

@mramato
Copy link
Contributor Author

mramato commented Oct 23, 2014

Sounds like a plan.

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

3 participants