Crisspl / GPU-particle-system

2M particles system done with OpenGL 4.5 (mainly the power of compute shader)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPU-particle-system

The project is system of 2M textured particles interacting with user through gravity point. Gravity point is always in the center of the screen 800 units away from camera and remains active as long as left mouse button is pressed. All particle physics is calculated on GPU with compute shader. Source code of shaders is in main.cpp.
VS2017 project files are provided. For other platforms build please use CMake.

Input

  • mouse - camera rotation
  • W, A, S, D - moving camera
  • LMB - (de)activate gravity point

External projects used

  • GLFW - OpenGL context, window creation and input handling
  • flextGL - OGL files generation
  • some tga loading code by Michael Thomas Greer (tga.h, tga.c files)
  • fhl - My 2.5D graphics library on which I've been learning basics of OpenGL (not finished yet, but usable). I took a few classes from there. All CPU maths (quaternion, matrix and vector calculations) are done with classes from fhl. Also delta-time measuring and OpenGL functions loading are done with fhl.

See YouTube video with a little 'gameplay'!

About

2M particles system done with OpenGL 4.5 (mainly the power of compute shader)

License:MIT License


Languages

Language:C++ 53.9%Language:C 45.0%Language:CMake 1.1%