Mar
13
2020

Shader: Scrolling Texture With Fill Amount (line renderer)

Quick test shader for this thread https://forum.unity.com/threads/smooth-filling-of-the-2d-pipe-with-texture.845848/#post-5584480

Note: Your mesh should be properly UV mapped to be able to fill from 0 to 1 (with uv.y value)

Shader source:
https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Patterns/ScrollingFill.shader

Sample Texture

Sample fbx file (used in screenshot)
https://github.com/unitycoder/BlogUploads/blob/master/models/lineuv.FBX


Leave a comment

Connect

Twitter View LinkedIn profile Youtube Github Join Discord Twitch Instagram BlueSky

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.