Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Adding transparent.

Discussion in 'Shaders' started by Xandir, Feb 27, 2015.

  1. Xandir

    Xandir

    Joined:
    Jan 20, 2015
    Posts:
    7

    Attached Files:

  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    The shader is already rendering in transparent mode, but pretty much at the bottom it says:
    Code (CSharp):
    1. o.Alpha = 1.0;
    ... which means it's fully opaque.
    The alpha value range should be between 0..1, where 0=fully transparent, 0.5=50% transparent, 1.0=opaque.
     
  3. Xandir

    Xandir

    Joined:
    Jan 20, 2015
    Posts:
    7
    You are awesome, thx xD
     
  4. Neoku

    Neoku

    Joined:
    Oct 27, 2014
    Posts:
    261
    In Unity 5 "o.Alpha = 0.5;" not works (works fine in 4.6), the shader never is transparent, is a version 5 bug? any solution? thanks.
     
    Last edited: Mar 3, 2015