6.Shaders
An animated wire shader is included in the package for Built-in, Lightweight (4.1.0+) and Universal render pipeline (7.0.0+). The former is created using Amplify Shader Editor, and includes a shader function to use in custom shaders.
The latter two are created using Shader Graph, a sub-graph is included to use the wire animation in custom shaders.
When opening the URP shader in Shader Graph using the LWRP, a console error will be thrown. Once you compile the shader once, it will be converted to a LWRP shader.
You can open up the included shaders in the shader editor to see how the function should be used.
It is important to understand that wires use vertex colors as weights for the animation. The layout is as follows for every individual wire:
Channel | Function |
Red | Speed (Random 0.2/1.0) |
Green | Strength (Random 0.9/1.0) |
Blue | Unused |
Alpha | Mask (White is full effect, black is motionless part) |
1 of 1 users found this section helpful