Search Unity

Standard shader: transparent detail and mask interactions

Discussion in 'General Graphics' started by TieSKey, Feb 14, 2017.

  1. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    225
    I want to "apply" a transparent texture as the detail over an opaque base texture using the standard shader. But if I don't add a mask, the color of the last non-transparent pixel of the the detail gets repeated until the end.

    W/o mask:


    With detail texture itself as mask: (this is what I want)


    I'm completely new to shaders so I'd really appreciate if someone could explain my why this happens. Is it a problem with the texture? or just the way the shader works?

    The transparent pixels in the detail texture are 100% transparent.