Hello,I’m trying to use Cesium to display more than two image layers.The code is as follows:
var layers = cesiumWidget.centralBody.imageryLayerCollection;
var layer = new ImageryLayer(new OpenStreetMapImageryProvider({
url :“http://202.197.18.12/hiart2/15225/”
}));
layers.add(layer);
But when I added more than three layers continiously in this way, the system went wrong, the error Cesium provide is as follows:
An error occurred while rendering. Rendering has stopped.
RuntimeError: Program failed to link. Link log: error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers
Warning: D3D shader compilation failed with default flags. Retrying with avoid flow control.
error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers
Warning: D3D shader compilation failed with avoid flow control flags. Retrying with prefer flow control.
error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers
Warning: D3D shader compilation failed with prefer flow control flags.
Error
at new RuntimeError (http://202.197.18.14:8081/online3/pages/earth/js/Source/Core/RuntimeError.js:40:19)
at createAndLinkProgram (http://202.197.18.14:8081/online3/pages/earth/js/Source/Renderer/ShaderProgram.js:914:19)
at new ShaderProgram (http://202.197.18.14:8081/online3/pages/earth/js/Source/Renderer/ShaderProgram.js:612:23)
at Context.createShaderProgram (http://202.197.18.14:8081/online3/pages/earth/js/Source/Renderer/Context.js:1171:16)
at ShaderCache.getShaderProgram (http://202.197.18.14:8081/online3/pages/earth/js/Source/Renderer/ShaderCache.js:75:36)
at CentralBodySurfaceShaderSet.getShaderProgram (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/CentralBodySurfaceShaderSet.js:103:47)
at createRenderCommandsForSelectedTiles (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/CentralBodySurface.js:994:55)
at CentralBodySurface.update (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/CentralBodySurface.js:132:9)
at CentralBody.update (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/CentralBody.js:779:27)
at CompositePrimitive.update (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/CompositePrimitive.js:384:31)
at updatePrimitives (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/Scene.js:873:27)
at Scene.render (http://202.197.18.14:8081/online3/pages/earth/js/Source/Scene/Scene.js:929:9)
So could you help me with this problems?
Thanks!
-ZhangFan