The flag shader can be used to create props which contain something moving in the wind, such as flags or some kind
of cloth.
It's also possible to have multiple textures inside the same flag prop, which change based on the position of the
prop, just like the vanilla flags do.
This article assumes you are familiar with regular prop asset creation.
The vertex colors define which parts use the wind movement and multiple flag texture UV mapping.
If you're not planning to use multiple flag textures inside the same prop, like vanilla flags, then you can use the full
range from white to black to define how much movement each vertex will have.
White means no movement and black means maximum movement.
If you will use multiple flag textures inside the same prop, then you can't use any shade of gray, as it will break the
UV mapping when the flag tries to change textures. In that case, the flag must be completely black, and you can't
control the strength of the wind effect.
Vertex paint of example props. Only the flag on the left uses multiple flag textures in the same prop.
The LOD also moves in the wind, so it should also be treated as described above. The LOD texture should match the main texture,
but it can be scaled down to a lower resolution.
If you're using multiple flag textures for the same prop and want them to change based on position, just like the
vanilla flags, you must have the flag textures in a consistent grid. If you're not using multiple flag textures for the
same prop, then you can leave the flag grid parameters at default values.
A grid of flags for an example prop. 5 columns, 1 row, top left corner is (0,0), bottom right corner is (1024, 364).
Defines the X and Y coordinates of the top left and bottom right corners of the entire flag grid on the texture, in pixels, as
measured from the top left corner of the texture which is 0,0.
This will recalculate the vertex paint to reduce the strength of the wind movement. If you're using multiple flag textures on
one prop, you can't control the strength, as it will break the UV mapping when the flag tries to change textures.