Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Transparency Issue

Discussion in 'Shaders' started by LouishB, Oct 6, 2012.

  1. LouishB

    LouishB

    Joined:
    Sep 25, 2012
    Posts:
    9
    Fairly new at Unity so I might be missing something here, I have a transparency issue that's driving me a bit batty :)

    I want to fade objects into the scene, so I picked the default Transparent / Diffuse shader and scripted alpha value, but when the objects move and intersect their visibility keeps popping in and out randomly, even when alpha = 1. I attached two sample images, just by moving the cube to the left it falls mostly out of view.

    I tried some custom shaders from here which is pretty much what I want to do, but with no luck.

    help much appreciated. thanks!
     

    Attached Files:

  2. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Transparent shaders are always treated as transparent, even if their entire alpha is 1.0.

    Which means they'll end up having the same sorting issues.

    You could try swapping the shader on it's material out for an opaque one when alpha is 1...?
     
  3. LouishB

    LouishB

    Joined:
    Sep 25, 2012
    Posts:
    9
    I'll give it a go - thanks!!
     
unityunity