Error while loading gltf

RuntimeError: Fragment shader failed to compile. Compile log: ERROR: 0:62: ‘undefined’ : undeclared identifier
ERROR: 0:62: ‘texture2D’ : no matching overloaded function found
ERROR: 0:62: ‘SRGBtoLINEAR4’ : no matching overloaded function found
ERROR: 0:62: ‘=’ : dimension mismatch
ERROR: 0:62: ‘=’ : cannot convert from ‘const mediump float’ to ‘highp 4-component vector of float’

why i,m getting this error while loading gltf on the map.

Can you share the code you used to load the model? And what version of CesiumJS you’re using?

var entity = viewer.entities.add({

position : position,

model : {

uri : ‘…/Build/tiles2/nn/LibertStatue.gltf’,

}

});

cesium version:1.47

Can you confirm that this a valid model by trying it in this validator tool?

http://github.khronos.org/glTF-Validator/

If the model itself is valid, it might be a bug in Cesium. I would try it with the latest version of CesiumJS, and if that doesn’t work, please either share your model here or open a GitHub issue.

I got some error messages in the validator I converted some obj sample to gltf .i’m trying to load this obj file by converting it to gltf , but i’m getting these errors dont know why, do you have any idea?

What did you use to convert it? I just tried it with obj2gltf (https://github.com/AnalyticalGraphicsInc/obj2gltf) and it seems to work in Cesium. I just ran:

obj2gltf -i .\LibertStatue.obj -o LibertyStatue.gltf

``

Make sure the materials and images are all in the same folder when you’re converting.

i used fme translator to convert.but it didnt work.Thank for the converter can i use this converter in my web application.Does it work on the fly??Can you share any code samples how you have done the conversions.

You can use it in a web application if it has a Node.js backend, just follow the instructions and code samples here https://github.com/AnalyticalGraphicsInc/obj2gltf.

Otherwise, it should theoretically be possible to bundle it for use in a browser with Browserify (http://browserify.org/) but I haven’t tested this myself.

It might be easier to just convert your models ahead of time. What kind of application are you building?