blockshader_ghost.shader 347 B

123456789101112131415161718
  1. shader_type spatial;
  2. render_mode unshaded;
  3. render_mode blend_add;
  4. uniform vec4 color: hint_color;
  5. uniform float scale;
  6. void fragment()
  7. {
  8. float screen_y = mod(SCREEN_UV.y + TIME/30.0, 1.0);
  9. if (mod(screen_y, 1.0/100.0) <= 0.005){
  10. discard;
  11. }
  12. ALBEDO=color.xyz;
  13. if (cos(UV.x*scale/6.)>=0.9||cos(UV.y*scale/9.)>=0.9){
  14. ALBEDO=vec3(1,1,1);
  15. }
  16. }