Search Unity

Writing a shader to highlight certain edges of a square

Discussion in 'Shaders' started by rkhadder, May 29, 2019.

  1. rkhadder

    rkhadder

    Joined:
    Jan 4, 2015
    Posts:
    6
    I am writing a 2d tile based game. I am looking to write a shader that outlines certain edges of a square tile (i.e. just the top and right or just the bottom). The area I'm getting stuck at is how to know if the pixel I'm processing is part of the edge.