Search Unity

Resolved Sprite/Texture/Decal overlayed onto base Color/Texture

Discussion in 'Shader Graph' started by AwesomeX, Apr 17, 2019.

  1. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    115
    I'm looking to overlay a Sprite/Texture/Decal onto a material's base Color/Texture, without the Color affecting the Sprite's own color.
    The problem comes when the texture is unassigned which leads to a white material.

    This is when a texture is assigned.


    And when it's not assigned.


    I understand what's wrong for the most part, if the texture is unassigned then there's no opacity mask to use, which leads to a full white blend. So I'm just looking for some guidance.

    I've tried various blend modes and other methods including lerping. I've even tried logic branching but I'm just not sure if I'm overlooking a simple solution to this, or if it's just not something that's really easily doable.
     
  2. AwesomeX

    AwesomeX

    Joined:
    Sep 10, 2013
    Posts:
    115
    I've fixed the issue, and wrote a simple decal shader.
    For those that had the same issue as me. Change the texture's mode from White to Black.
     
    NeatWolf likes this.