Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are several ways to achieve this effect in the Unity Shader Graph. Here is one possible approach:

  1. Create a new shader graph and add a Texture 2D node for your scrolling empty texture.

  2. Add a Time node to your shader graph to control the scrolling speed and direction.

  3. Create a new Material using your shader graph.

  4. Add a pattern texture to your project assets and import it into Unity.

  5. Create a new Texture 2D node for your pattern texture and set it to Repeat in the Texture Sample node.

  6. Use a Math node to multiply the UV coordinates of your pattern texture by a desired scale factor.

  7. Connect the Time node to the UV input of the Texture 2D node controlling your empty texture, and adjust the speed and direction as desired.

  8. Connect the scaled UV coordinates from step 6 to a Texture Sample node for your pattern texture, and mix it with your empty texture using a Blend node.

  9. Use the output of the Blend node as the final output for your shader graph.

  10. Apply the material to a mesh or sprite renderer in your scene, and adjust the scrolling speed and scale factor as desired to achieve the desired effect.