Home Game Development unity – Shader UV Normals/Direction vs UV Tiling/Stretching for Sprite Shape

unity – Shader UV Normals/Direction vs UV Tiling/Stretching for Sprite Shape

0
unity – Shader UV Normals/Direction vs UV Tiling/Stretching for Sprite Shape

[ad_1]

I’ll be the primary to confess I’m not incredible with shaders, so so far as I do know, this can be a quite simple answer that I’m simply unaware of.

What I’m attempting to do is to put in writing a shader for Unity’s Sprite Shapes that will likely be utilized across the edges. Luckily the sprite shapes have a special materials property for the fill and the sting, that is nice.

I’m attempting to do a kind of “dissolve” shader across the edges that dissipate “outwards”, that’s to say, in direction of the sting regular.

The precise shader half is pretty easy, however the concern I’ve run into most likely has to do with how sprite shapes are rendered.

By default, with no UV manipulation, this appears to work aside from the truth that the fabric seems to be stretched and tiled oddly alongside the sides:

https://imgur.com/osh6V4w

If i do meddle with some UV manipulation, particularly throw a Position node output into my Tiling and Offset node, the stretching appears to be fastened, however now the animation not performs within the route of the particular edge regular, however in direction of one central level (up on this case):

https://imgur.com/91khZwS

What I wish to accomplish, in principle, needs to be easy. Use the conventional information from the primary answer, and the “stretching” information from the second answer.

But I can not seem to get that working.

For reference, that is what the shader seems to be like (outlined the part the place the UV concern occurs)

enter image description here

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here