Swapping Sprite's Texture with shader
Posted: Sat Jun 02, 2018 8:00 am
Hi,
I found one way to swap sprite's texture to a different one using the following:
https://github.com/RetryEntry/UnityAnimatorChangeSprite
It is working when switching texture for the object and animation works nicely without a problem.
I would like to learn to do this with Amplify Shader and get rid of other nonsense. Just want to swap the texture.
What node(s) I should use? If no texture is given, use the one already on the sprite renderer?
And it seems that because the shader I linked, is using surface shaders it does have some lightning info (?) and my sprite is getting a weird dark overlay on it.
Thanks in advance.
I found one way to swap sprite's texture to a different one using the following:
https://github.com/RetryEntry/UnityAnimatorChangeSprite
It is working when switching texture for the object and animation works nicely without a problem.
I would like to learn to do this with Amplify Shader and get rid of other nonsense. Just want to swap the texture.
What node(s) I should use? If no texture is given, use the one already on the sprite renderer?
And it seems that because the shader I linked, is using surface shaders it does have some lightning info (?) and my sprite is getting a weird dark overlay on it.
Thanks in advance.