Flag Master – Atlased Mesh Generated Flag Shader – URP


Flag generator inside shader with procedural GPU instance or full cloth simulation, single or atlas texture compatible, with its own Atlas Generator, Instance script for per object material features


by SOIL


Price History +

What is Flag Master?


  • A shader that generates the flag out of nothing!
  • Every feature can be stripped down in the material settings!
  • A "per object instance" component that controls the features of the shader
  • Its own smart Atlas Generator to generate your own PBR Atlas

Simulation

  • Procedural GPU vertex wave (primary wave + gust layer)
  • GPU cloth simulation (compute shader, Verlet, substeps, solver iterations)
  • Stretch factor, material stiffness, damping, gravity
  • Twist limit around the mast with falloff curve
  • Follow object, vertex speed cap, teleport handling
  • Pseudo gravity, bend spread, bend curve

Wind

  • Unity WindZone support (turbulence, pulse, strength)
  • Wind sensitivity
  • Wind Director component
  • Per instance desync: seed, time spread, speed variation
  • Wind lag, yaw/pitch jitter, local gust, exposure, sensitivity variation
  • Wind travel across a row of flags

Setup

  • Grid mesh generator, 2 to 128 subdivisions, shared mesh cache
  • Plane scale X/Y
  • 6 attach modes: Left, Top, Right, Bottom, Top+Bottom, Left+Right
  • Pivot modes: Center, Seam, Manual, with seam anchors
  • Scene view gizmos for wind, pivot and seams

Atlas

  • Atlas Generator and Baker
  • 1x1, 1x2, 2x2 blocks, per instance atlas index
  • Example textures included (albedo and normals)

Shading (URP Lit)

  • Albedo, normal, metallic/smoothness, emission maps
  • Albedo to smoothness / metallic, invert options
  • Occlusion tint and strength
  • Translucency with mask, distortion, power, backlit mode
  • Self shadow (procedural mode)
  • Cast shadow strength and mask influence
  • Burned holes and edge burn
  • Double sided with backface flip
  • Opaque, cutout and transparent render modes

Rendering

  • Forward and Deferred renderer support
  • Full pass set: shadows, depth, depth normals, scene selection, picking
  • Motion vectors for TAA, motion blur, DLSS, FSR, STP
  • XR motion vectors (Application SpaceWarp)
  • Lightmaps, probe volumes, decals, SSAO, light cookies, light layers

Performance

  • GPU Instancing and SRP Batching, auto detected per material
  • MaterialPropertyBlock driven per object data
  • Custom shader GUI with per material feature stripping
  • Scales from Switch to PC and consoles

IMPORTANT: The shader reads a single PBR flag texture set, or just the albedo if you have nothing else, or an atlased PBR texture set with many flags packed into one atlas. The FlagMaster package ships with a few example textures for the Atlas Generator, albedo and normals only. Your own flag textures are up to you, either from an artist or from AI image generation.

Be aware that you need to know how to author a PBR texture set. If you don't, an albedo/diffuse texture is the minimum, both for the Atlas Generator and for the shader itself. In that case you lose the PBR capabilities.


Else, you get a full blown flag system that can be stripped down in its material settings to the minimum of just having an abledo with no other effect, procedural, which gives you the possiblity to set hundrets of flags via GPU instancing, working on mobile too.