Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.06 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.06 KB

2D Grass Particles

Just a prototype idea that I briefly showcased in this video

image

You can drag around the particle emitter and the grass will automatically reposition in real-time if you have local_coords disabled on the emitter.

Concept

Made of 2 shaders, a particle shader and a fragment+vertex shader

Particle Shader

  • Places grass instances in a grid using their INDEX
  • Spaces them according to spacing uniform
  • Passes the world position of the particle to the fragment+vertex shader

Fragment and Vertex Shader

  • Calculates a circle around the player position
  • Stomp animation for anything within that circle
  • Kinda fades it towards the edges of the circle
  • Rotates the vertices according to the wind
  • Uses the world position to select a random sprite from a spritesheet
  • Colors the top and bottom of the grass

No Credit needed but like drop a sub for me plz?