Search Unity

Question 2D texture from multiple sprite

Discussion in 'Shader Graph' started by alkaitagi, May 30, 2019.

  1. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    87
    Hello. So I have a shader that radially fills texture over 360 degrees. The texture I use is in multiple sprite mode, specifically there are 2 sprites in it. For the sprite renderer I apply the shader to I put one of the sprites into the `sprite` field. However, in the _MainTex field of the material the whole texture (i.e. entire spritesheet of 2 sprite) appears instead of the one sprite I put into the sprite renderer. How can I set _MainTex of material to the specific sprite of the sprite renderer and not the whole spritesheet texture?
    Unity2019.2.0b4 LWPR 2DUnlit

    upload_2019-5-30_20-3-55.png

    upload_2019-5-30_20-6-15.png

    upload_2019-5-30_20-5-52.png
     

    Attached Files: