GithubHelp home page GithubHelp logo

lesleylai / glgrassrenderer Goto Github PK

View Code? Open in Web Editor NEW
84.0 6.0 16.0 29.78 MB

OpenGL Grass Renderer

License: Apache License 2.0

CMake 9.89% GLSL 12.60% C++ 77.51%
opengl glsl compute-shader tessellation-shader culling

glgrassrenderer's Introduction

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

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 and Conan package manager. To successfully build the project, you need both tools installed. You can install conan through python pip:

$ pip install conan # Or pip3 on some linux distributions, use sudo if nessesory

After installing all the tools, 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

glgrassrenderer's People

Contributors

lesleylai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

glgrassrenderer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.