bug?[GL] Shader program link log: Pixel shader sampler count exceeds MAX_TEXTURE_IMAGE_UNITS (16).

hi team!

when I added about five layers and then add another layer on 3D,there was a catch:[GL] Shader program link log: Pixel shader sampler count exceeds MAX_TEXTURE_IMAGE_UNITS (16).
but it is only six layers.

these layers are tile layers.

在 2013年12月6日星期五UTC+8上午11时07分59秒,Nian Li写道:

As the message implies, WebGL has a limit on the number of textures that can be used in a single draw call. It guarantees that at least 8 are supported, and some hardware supports more, like yours with 16. When your terrain and imagery tiling schemes are not aligned, a single imagery layer can end up requiring 2-3 textures. Plus a couple of texture units are sometimes used for things like the water effect when you’re using CesiumTerrainProvider. So it’s not surprising to get this message at around 6 layers.

It’s possible for us to work around this WebGL limitation within Cesium, by breaking a tile into multiple draw calls when necessary. But this comes at a significant cost of complexity and performance. At 6 overlapping layers, you’re probably already starting to see some slowdown anyway. A much better solution is to combine some or all of your layers on the server side.

Kevin

Kevin:

thanks very much.and I will test the server side ,if fine,our team maybe use this engine.
thanks,

leenian
在 2013年12月6日星期五UTC+8下午10时31分05秒,Kevin Ring写道:

hi Kevin:
I get a solution using a temp canvas that when all images ready then for(var i,len =imgs.length;i++){ cxt.drawImage()…}
在 2013年12月6日星期五UTC+8上午11时07分59秒,Nian Li写道: