Skip to content

nekotogd/Godot_2D_Grass_Particles

Repository files navigation

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?

About

Interactive 2D Grass Particles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published