You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CylinderFadeMaterial.glsl 414B

1234567891011
  1. uniform vec4 color;
  2. czm_material czm_getMaterial(czm_materialInput materialInput){
  3. czm_material material = czm_getDefaultMaterial(materialInput);
  4. vec2 st = materialInput.st;
  5. float powerRatio = 1. / (fract(czm_frameNumber / 30.0) + 1.) ;
  6. float alpha = pow(1. - st.t,powerRatio);
  7. vec4 temp = vec4(color.rgb, alpha * color.a);
  8. material.diffuse = temp.rgb;
  9. material.alpha = temp.a;
  10. return material;
  11. }