How to map texture in 3D model custom shader

in plane,we can mapping image texture like this

rectangle.appearance.material = new Cesium.Material({
fabric: {
uniforms: {
image: ‘./sky.JPG’,
alpha: 1.0,
},
source: /* glsl */ czm_material czm_getMaterial(czm_materialInput materialInput){ czm_material material=czm_getDefaultMaterial(materialInput); material.diffuse=texture2D(image,materialInput.st).rgb; return material; }
}
})

but how i can mapping in 3d Model in shader

    fragmentShaderText: `
        void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
        {

          vec3 position = fsInput.attributes.positionMC ;
           vec4 color1 = texture(u_Sampler, vec2(position.x , position.y ));

          material.diffuse = czm_srgbToLinear( vec3(color1.x , color1.y , color1.z) );


        }
        `,

Hi @chen21439,
Thanks for your post and for being a part of the Cesium community.

In this example sandcastle, the first option in the drop down “Custom Texture” shows a model with custom shader applied which uses an image for the texture Cesium Sandcastle

The customer shader in the example shows animation which results from repositioning the texture. To achieve what I believe you are looking for you can simple remove the animation logic.

Please let us know if this is what you are looking for and if we can answer further questions.

Best,
Luke