← All resources

ColinLeung-NiloCat GitHub - UnityURP-MobileDrawMeshInstancedIndirectExample

Auto-discovered

Library / Codebase Advanced

ColinLeung-NiloCat

Visit resource ↗

Description

ColinLeung-NiloCat’s Unity URP sample draws mobile grass at million-instance scale with Graphics.DrawMeshInstancedIndirect, not terrain foliage or basic instancing.

CPU cell frustum culling feeds a compute pass that marks visible instances; InstancedIndirectGrassRenderer.cs issues one indirect draw with counts from ComputeBuffer.CopyCount.

A custom instanced grass shader handles lighting and motion, and a URP RendererFeature captures a top-down R8 bend mask for trail bending. Readme notes require OpenGL ES 3.2 or Vulkan on Android; performance tracks on-screen visible blades.

For advanced developers using compute buffers, HLSL, and URP hooks; follow Unity 2019.4.x and platform limits documented in the readme.

Widely starred on GitHub and often cited for mobile indirect instancing in Unity, while omitting production spatial acceleration and authoring tools.