Search Unity

Output shaded sprite to a texture?

Discussion in 'General Graphics' started by thatnoobles, Sep 4, 2021.

  1. thatnoobles

    thatnoobles

    Joined:
    Jun 22, 2018
    Posts:
    6
    Hello! I have a SpriteRenderer with a shader that posterizes anything behind it (see image). How could I render the shaded sprite to a texture?

    I saw that you can use Graphics.Blit to achieve something similar, but that gets the whole camera view. I just want to get this specific rectangular area. I also want to avoid using multiple cameras because of performance concerns.

    Thanks!

    upload_2021-9-4_0-4-24.png