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) );
}
`,