Saturday, September 24, 2022
HomeGame Developmentunity - Shader UV Normals/Route vs UV Tiling/Stretching for Sprite Form

unity – Shader UV Normals/Route vs UV Tiling/Stretching for Sprite Form


I will be the primary to confess I am not improbable with shaders, so so far as I do know, this can be a quite simple answer that I am simply unaware of.

What I am attempting to do is to jot down a shader for Unity’s Sprite Shapes that can be utilized across the edges. Fortunately the sprite shapes have a distinct materials property for the fill and the sting, that is nice.

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

The precise shader half is pretty easy, however the problem I’ve run into in all probability 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 stretched and tiled oddly alongside the sides:

https://imgur.com/osh6V4w

If i do meddle with some UV manipulation, particularly throw a Place node output into my Tiling and Offset node, the stretching appears to be mounted, however now the animation now not performs within the route of the precise edge regular, however in the 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 traditional information from the primary answer, and the “stretching” information from the second answer.

However I can not seem to get that working.

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

enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments