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

Mask alpha shader with spriteRender

Discussion in '2D' started by Balours, Nov 30, 2013.

  1. Balours

    Balours

    Joined:
    Nov 27, 2013
    Posts:
    59
    Hey all !

    I'm trying to add a mask alpha shader to a sprite but i'm getting an error on my spriteRenderer :

    "Material uses fixed function shader. It is not compatible with SpriteRenderer".

    Is it possible to use shader on 2D sprite ? What should I do ?

    Ty !
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Don't use a fixed function shader. Fixed function shaders don't really have a place in the world any more. Use a surface shader, or better yet - a cg shader.
     
  3. Balours

    Balours

    Joined:
    Nov 27, 2013
    Posts:
    59
    And all examples are with fixed function ... It's gonna be hard.
    Does someone know where to find this surface shader alpha mask ?