Skip to content

LesleyLai/GLGrassRenderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenGL Grass Renderer

This project is a C++/OpenGL implementation of Responsive Real-Time Grass Rendering for General 3D Scenes. The project uses Bezier curves to represent individual grass blades. It uses compute shader to perform force simulation in Euler's method and perform various culling methods. Afterward the buffer of curves is passed to a tessellation shader to dynamically generate triangle geometry for grass blades.

demo image of the grass renderer project

Tested on:

  • Windows 10, i7-8650U @ 1.90GHz, GTX 1050 (laptop)
  • Same laptop with Intel UHD Graphics 620 Integrated GPU does not work currently, need to figure out why
  • Manjaro Linux 18.0.4, i7-7700 @ 3.60GHz, RTX 2070 (desktop)

Build instruction

This project uses CMake build system. You can build the project with the following CMake instructions.

$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make

Features

  • Wind, gravity, and restoration forces simulation in compute shader with Euler's method
  • frustum and distance cullings in compute shader with indirect drawing
  • Tessellation LOD base on distance
  • a pair of tessellation control shader and tessellation evaluation shader to generate triangle geometry
  • An immediate GUI interface for user control

Q & A

  • Q: I don't see any grass. A: Make sure not to use the Intel integrated GPU to run the program