View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.0
- Last updated
- First released
- Unity version
- 6000.4.8 or later
- Package size
- 86.4 MB
- Files
- 117
- Views in the past week
- 15
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- $22.00 on
Keywords
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
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 2
Flag Master - Atlased Mesh Generated Flag Shader - URP screenshot 1
About this asset
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.
From the publisher's Asset Store listing.
Technical details
Pipeline
- Universal Render Pipeline only, Unity 6 (developed on 6.4 LTS)
- Forward, Forward+ and Deferred renderer paths
- Shader target 4.5
- ForwardLit pass tagged UniversalForwardOnly, DepthNormals tagged DepthNormalsOnly
Shader passes
- ForwardLit, ShadowCaster, DepthOnly, DepthNormals
- MotionVectors, XRMotionVectors
- SceneSelection and Picking (editor only, stripped from builds)
- Identical vertex deformation across all passes, single shared source
Cloth solver
- Compute shader, 6 kernels, 256 threads per group
- Verlet integration with distance, shear and bend constraints
- Configurable substeps (1 to 8) and solver iterations (1 to 32)
- Ping pong buffers, scheduling independent and frame deterministic
- 8 ComputeBuffers per flag instance, float3 world space positions
- Normals and tangents computed on the GPU
- No CPU readback, no runtime mesh writes
- Requires SystemInfo.supportsComputeShaders, falls back with a clear warning
Mesh
- Runtime generated grid, 2 to 128 subdivisions per axis
- Vertex count = (subdivisionsX + 1) × (subdivisionsY + 1), up to 16,641
- Static mesh cache shared across all instances of the same resolution
Batching
- Procedural mode: GPU Instancing via MaterialPropertyBlock, or SRP Batching via material instance, auto detected from the material
- Cloth mode: one draw call per flag, batching disabled by design
- Instanced properties packed to minimise per instance constant buffer size
Motion vectors
- Per object motion vector generation mode set automatically
- Procedural: previous frame reconstructed from previous time, wind and object matrix
- Cloth: dedicated frame history buffer taken before the first substep
- Compatible with TAA, motion blur, DLSS, FSR and STP
Keywords and stripping
- All feature keywords are shader_feature_local
- Per material stripping checkboxes in the custom shader GUI
- Unused features compile out completely, including their interpolators
Code
- C# with assembly definitions, runtime and editor separated
- ExecuteAlways component, full edit mode preview
- No coroutines, no per frame allocations, cached property IDs
- Global fallback buffers for material previews, thumbnails and picking
Compatibility
| Unity version | Built-in | URP | HDRP |
|---|---|---|---|
| 6000.4.8f1 | Not listed | Compatible | Not listed |
Only for:
- URP 14+
- Unity 6
Not tested in Unity 2022.x!
As listed on the Asset Store.