Modify transparency of mesh with next_pass shader

:bust_in_silhouette: Reply From: SIsilicon

Actually, there’s a SpatialMaterial property specifically for this kind of case. It’s called Distance Fade. It has a pixel alpha mode, a pixel dither mode, and an object dither mode.

  • Pixel Alpha Mode: The actual transparency of a pixel of the object changes with distance to the camera. This is the most effect, but forces the material into the transparency pipeline. So no shadows for you. :frowning:
    Pixel Alpha
  • Pixel Dither Mode: What this does is sort of approximate the transparency by only having a fraction of the pixels rendered. This may or may not look good depending on your project. But hey. At least you got your shadows back. :slight_smile:
    Pixel Dither
  • Object Dither Mode: Like the previous mode, but the calculated transparency is the same across the entire object’s surface.
    Object Dither

In your case option 3 may not be what you want.