Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rpless/grass

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grass Simulation

The goal of this project is to write a proof of concept geometry shader that generates grass.

Controls

  • W: Move Forward
  • S: Move Backward
  • A: Strafe Left
  • D: Strafe Right
  • Escape: Close the simulation
  • Mouse: Moves the view around

Strategy

The idea is to use barycentric coordinates and a Mersenne Twister to generate random points on each triangle. From these random points, we can generate geometry that is shaped like blades of grass.

Generating Randomness on the GPU

To generate randomness I ported Mutsuo Saito's and Makoto Matsumoto's TinyMT mersenne twistter to GLSL. I'm not quite sure if I nailed all of the casting that goes on in TinyMT, because GLSL isn't as forgiving with its Type System. The original implementation can be found here.

Software Dependencies

  • Java 8
  • Maven 3 (if building from source)

About

A shader that generates grass blades.

Resources

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.