Search Unity

Distorted sprite on SpriteRenderer after changing material

Discussion in 'General Graphics' started by Jihaysse, Aug 4, 2021.

  1. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    53
    Hello,

    I'm trying to change my sprite to another material (using StencilMask as a shader) but as soon as I apply the other material (instead of the default SpriteDefault), my sprite is messed up.







    The black one is my original sprite (the shape I need), the orange one (don't mind the color) is the distorted sprite once I applied my other material.

    Here is my shader code if needed: https://pastebin.com/gBGG4ecj

    Any idea what could be the issue?

    Thank you very much!