GuLiMmo
2024-03-12 55fcb97a3d487f54353564f1e402e4d4b61feee9
src/utils/cesium/ImageTrailMaterial.ts
@@ -135,14 +135,16 @@
      animation: false,
      duration: 30,
      time: 0,
      repeat: new Cesium.Cartesian2(1, 1),
    },
    // source编写glsl,可以使用uniforms参数,值来自getValue方法的result
    source: `
      #extension GL_OES_standard_derivatives : enable
      czm_material czm_getMaterial(czm_materialInput materialInput)
      {
          czm_material material = czm_getDefaultMaterial(materialInput);
          vec2 st = materialInput.st;
          float s = st.s/ (abs(fwidth(st.s)) * imageW * czm_pixelRatio);
          vec2 st = repeat * materialInput.st;
          float s = st.s / (abs(fwidth(st.s)) * imageW * czm_pixelRatio);
          if(animation==true){
            s = s-time;//增加运动效果
          }