Stylized Grass Shader
A shader focused on delivering stunning visual and tactile grass for the Universal Render Pipeline.
NEW! Support for runtime colormap baking!
🌿 Key features
• Lush wind animations, supports dynamic speed/direction changes (through a Wind Zone)
• Easy to use interaction system. Bending and flattening through trails, meshes, lines or particle effects.
• Color blending with terrain surface (supports tiled setups and mesh terrains)
• Per object and per vertex color variation, breaks up visual repetition
• Sun light translucency rendering
• Perspective correction, for optimal coverage when viewed from top-down
• Angle fading, fades out faces not oriented to camera
• Near/far camera fading
⚙️ Technical
• SRP Batching compatible
• Physically-based or simple shading mode (similar to the Lit and Simple Lit shaders)
• Bending functionality does not use a 2nd camera! Best in class performance! (No overhead for additional culling and batching)
• Expertly crafted hand-written shader, for optimal efficiency.
✔️ Compatibility
• Universal Render Pipeline (URP) 12.1.8+ (excluding the Built-in RP & HDRP)
• PC, macOS (OpenGL/Metal), Consoles.
• One-click integration for Vegetation Studio/Pro, Nature Renderer (2020/2021), GPU Instancer, Curved World 2020.
🚧 Limitations
• Not a grass placement/render tool (documentation includes tips)
• Not suitable for mobile platforms.
• (See Technical Details sections below)
Technical details
⚠️ It is expected you already know what the Universal Render Pipeline is, and have already converted your project to it.
- Grass is composed out of regular individual meshes, unlike a geometry shader.
- Performance will mainly depend on the method used for rendering.
- All content is authored for the linear color space.
- Hybrid Renderer v2 compatibilty has been tested in Unity's sample project (v1.0.0-pre5).
- Color map baking is typically limited to 4x4km landscapes (quality wise!).
- LOD crossfading can induce flickering for the object's cast shadows, due to a design restriction in URP
- Grass bending takes effect on any grass below the bending object, as such it can't be made to work on multiple height levels
- Grass bending is projected in a planar fashion, and won't work on spherical worlds.