Statically used varyings do not fit within packing limits

Any Cesium team members have any suggestions on working around the following issue while launching a basic Cesium.Viewer instance? Happy to provide more info as needed.

var viewer = new Cesium.Viewer(‘globe’);

Note that in this example there will not be any layers/tiles (unreachable, and I am not supplying my own for this example).

Cesium 1.26
CentOS 6.4 64-bit
Firefox 45.3
NVIDIA NVS 440 in Xinerama mode
All Firefox configuration info points to WebGL being supported, i.e. from about:support:
WebGL Renderer : NVIDIA Corporation == Quadro NVS 440/PCIe/SSE2

Error is as follows:
[Cesium WebGL] Shader program link log: Statically used varyings do not fit within packing limits. (see GLSL ES Specification 1.0.17, p111)
createAndLinkProgram() : Cesium.js:70589
initialize(): Cesium.js:70790
ShaderProgram.prototype._bind(): Cesium.js:70807

There is also another error with no stack trace:
Error: WebGL: texImage2D: Uploading ArrayBuffers with FLIP_Y or PREMULTIPLY_ALPHA is slow.

Thanks for any assistance.

Hi Chris,

When you browse to what does “Max Varying Vectors” report?

Are your drivers up-to-date? Have you tried the latest Firefox and Chrome?

It is possible that a shader used by default in GLSL (likely the globe’s shader) uses more varyings than the guaranteed WebGL minimum, and we’ve just never ran into it in the wild.



Unfortunately I will not be able to provide any report data from Our drivers are fairly up-to-date but not great: NVIDIA Driver 304.131

Are there any browser-level WebGL settings I might be able to override or will this be a problem within Cesium itself?


There’s no browser settings for the number of varyings; this is a limitation of the WebGL implementation (ANGLE/driver/hardware).

It may be possible to simplify a shader in Cesium - you’ll need to track down the right shader program (just log the number of varyings used to the console) and see what could be simplified. We would welcome a pull request if you dig into this. See