Use a 3D URP Unlit graph
Use Unity 2022.3 LTS, URP/Shader Graph 14 and Universal Renderer in a 3D project. Shader Graph creates appearance calculations by connecting nodes. Begin with a Plane, a flat surface, to hide the black areas of a mask and add color. Move to Particle System after that works. Built-in, HDRP and 2D Sprite graphs use different settings.
1. Prepare the mask and graph
- Import the opaque grayscale PNG as a Default texture; disable sRGB because R is numeric mask data.
Connect image brightness to opacity: black disappears - Create a URP Unlit Shader Graph and confirm the Universal Unlit target in Graph Inspector.
Transparent / Alpha / Clipping OFF - Set Surface Type to Transparent and Blending Mode to Alpha. Leave Alpha Clipping off initially.
Transparent / Alpha / Clipping OFF - Expose Texture2D MaskTex, Color Tint and Float Intensity/Opacity on the Blackboard. Start with white Tint and numeric values of one.
Expose Texture2D MaskTex · Color Tint · Float
2. Connect Base Color and Alpha
Right-click empty graph space to add Sample Texture 2D, Multiply and Saturate nodes. Connect MaskTex to the sample’s Texture input and use Type Default. Multiply sample R by Opacity, pass the result through Saturate, and connect to Fragment Alpha. Saturate keeps the value between 0 and 1. Multiply Tint RGB by Intensity into Base Color. Use Split/Swizzle if you need to extract RGB explicitly.
| Output | Calculation |
|---|---|
| Base Color | Tint RGB × Intensity |
| Alpha | Saturate(Sample Texture 2D R × Opacity) |
The shape is stored in R in this grayscale image. An all-one A connected to Alpha would leave the black rectangle visible. If you later use a PNG with a transparent background, read A where its transparency is stored. In this Unlit graph, connect display color to Base Color.
3. Create a material and test a plane
Save the graph. Right-click it in Project and choose Create → Material. Set MaskTex to the PNG in Material Inspector. Select the Plane and assign the Material under Mesh Renderer → Materials. Lower Opacity from 1 to 0: the shape should disappear. Change Tint to check color. Inspect face orientation and use Render Face Both if it must be visible from behind.
The appearance of higher Intensity also depends on HDR, exposure and bloom. Do not treat it as a guaranteed substitute for a light; see the Bloom checklist.
4. Drive UV offset with time
UVs determine where the image is placed. Add Tiling And Offset with Tiling (1,1). Multiply the Time node’s Time output by a Vector2 Speed into Offset, using Speed (0.2,0). Connect Out to Sample Texture 2D UV to move the pattern over time. An unconnected Tiling And Offset UV input uses the mesh’s standard UV binding.
Inspect seams and apparent travel with a repeat-ready texture. Increasing a sampled UV coordinate should not be confused with the apparent direction of pattern motion; use an arrowed test texture.
5. Integrate Particle System color afterward
Select Particle System and open Renderer → Custom Vertex Streams. Check that it supplies Color and the UVs used by the graph. Add Vertex Color: multiply RGB into display color and A into Alpha. Change Start Color to test color, then lower Alpha in Color over Lifetime to test fading.
For particle-specific details, see the mesh-particle/Vertex Streams guide. Verify texture, Tint, Opacity, UVs and particle color individually before adding complexity.