Skip to content

Sundownerr/GrassShader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 

Repository files navigation

Preview

preview.mp4

Settings

photo_2022-12-09_15-27-48 image

Description

This is an interactive grass shader. It fakes some wind (strength and speed is adjustable) and also bends around specified objects.

Cutting grass works by shrinking it to 0.1f height and emitting particles at the cut position. Collision and growing is calculated using a script but the grass is drawn using GPU instancing command using an optimized array with all the information like size, bending etc. The wind bending is done using noise function in the vertex shader.

How to use

Look at complete setup in GrassScene.

About

🌿 Optimized interactive grass

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C# 84.3%
  • ShaderLab 15.7%