This topic needs a title

Hi,

I have started using KHR_techniques_webgl in my gltf models and it works well so far on Cesium 1.50.

However I haven’t been able to find a way to change the uniform values so far. The material does not have a name apparently so I can’t call getMaterlal and therefore can’t access their values. In fact, I haven’t seen in the specs a name see :

"materials": [
    {
        "extensions": {
            "KHR_techniques_webgl": {
                "technique": 0,
                "values" : {
                    "u_light0Color": [
                        0.8,
                        0.8,
                        1.0
                    ]
                }
            }
        }
    }
]

Is there a way to achieve what I am trying to do (change uniform values of currently loaded model)? or am I missing something?

Thanks,

-Lionel

This seems like a missing feature as far as I can tell. You can see the engine actually keeps track of materials by ID here:

But doesn’t expose a way to get it. Feel free to open up a feature request on the GitHub issues (https://github.com/AnalyticalGraphicsInc/cesium/issues) to request this.

As a workaround, you could modify the glTF to give the material a name so you can access it.