It is recommended to layout all the faces inside the UV square for cleaner results. For instance, if our goal is to make the arrows loop through the side faces of the cube, we need to get rid of the top and bottom faces, and orient all the side faces in the same direction. We need to lay out the UVs of our mesh in a way that allows for easy scrolling. If we use the default cube mesh in Unity as our mesh, the texture we chose will scroll over every face:įurthermore, we can see both side faces are going against each other, thus breaking the scrolling effect. In this case, we need to be mindful of the UVs. Using your own meshesĪ series of meshes ready to use are included within this repository, but depending on your project, you will most likely have the need to use meshes other than these. When using textures that allow transparency (.png for instance), this information is taken into consideration. Assign this new material to a quad and there we go, we now have a scrolling texture: The setup for this shader is minimal, all you need to do is create a new material and assign a base texture, which will be scrolled over the UVs. This will not download the screenshots folder.ĭisclaimer: The scripts controlling the behavior of the examples provided are not optimized in any way and should only be taken as quick & dirty examples. You can also just download a unitypackage (lightweight) from the releases tab and easily import everything to your project. (Beware: The screenshots folder is quite heavy at the moment, I need to find a way to reduce file size for gifs without losing too much quality) You can work on your own branch and send a pull request with your changes. Please use this version if you are planning on contributing. Project developed using Unity 2017.4.8f1. It can be edited through Amplify Shader Editor and contributions to the project are always welcome! By getting creative with mesh geometry and textures, we can achieve a wide range of results. This shader is a glorified texture panner, with a few extra features oriented towards adding variety.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |