Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CircleVaryMaterial.glsl 715B

123456789101112131415161718
  1. uniform vec4 color;
  2. uniform float speed;
  3. czm_material czm_getMaterial(czm_materialInput materialInput){
  4. czm_material material = czm_getDefaultMaterial(materialInput);
  5. vec2 st = materialInput.st * 2.0 - 1.0;
  6. float time =czm_frameNumber * speed / 1000.0;
  7. float radius = length(st);
  8. float angle = atan(st.y/st.x);
  9. float radius1 = sin(time * 2.0) + sin(40.0*angle+time)*0.01;
  10. float radius2 = cos(time * 3.0);
  11. vec3 fragColor = 0.2 + 0.5 * cos( time + color.rgb + vec3(0,2,4));
  12. float inten1 = 1.0 - sqrt(abs(radius1 - radius));
  13. float inten2 = 1.0 - sqrt(abs(radius2 - radius));
  14. material.alpha = pow(inten1 + inten2 , 5.0) ;
  15. material.diffuse = fragColor * (inten1 + inten2);
  16. return material;
  17. }