Interactive Grass Kit
Project Overview
A package containing optimized grass meshes and a dedicated shader that handles wind simulation and player interaction entirely on the GPU. The shader is lit but bypasses standard URP light passes, using a custom Main Light calculation that only simulates sunlight direction and intensity.
Technical Implementation
- Custom Lighting Model: The shader operates as a Lit material but bypasses standard URP light interactions. Instead, it simulates the Main Light (Sun) manually. This ensures the grass retains its stylized, flat colors while still reacting predictably to time of day.
- Physics-Free Interaction: Player position is passed globally to the shader, which bends the grass vertices away from the character organically using distance fields.
- Terrain Integration: Includes ready-to-use prefabs optimized specifically for Unity's Terrain details system to allow dense painting with minimal draw call overhead.