Giter Club home page Giter Club logo

gpuparticleplayground's Introduction

GPUParticlePlayground

A DirectX 11 based boid flocking simulation.

Features And Notes

  • Requires DirectX 11
  • Requires shader model 5.0 or higher.
  • Normal map painting via realtime height map sampling.
    • Boids will collide with brush strokes.
    • No inter frame interpolation (fast movements can leave spotty strokes).
    • Also works as a voronoi cell painter (with very high brush size).
  • Boid/Physics simulation
    • Simulation unit scale is in pixels.
    • Simulate up to 16,000 boids at once (for an average fps of 120 on test machine).
      • Could be increased but for ui design reasons this was an ok cap.
    • Runtime configuration to change boid simulation settings.
    • Runtime configuration to change physics simulation settings.
  • Input
    • Q: Repel boids.
    • W: Restart Simulation.
    • E: Attract boids.
    • Left mouse button: brush paint.

Source File Appendix

  • RootRenderer
    • Executes the render and simulation loop.
    • Creates and holds reference of runtime graphics resources.
  • SH_CS_BoidCompute
    • Responsible for core boid simulation logic.
    • DirectX11 Compute Shader.
    • CSBoidMain kernel executes boid simulation on the gpu with 32 items per thread group.
  • SH_IMG_Drawing
    • Screen space shader for normal map painting.
    • Outputs to an accumulative drawing buffer.
    • renders a 2D signed distance field where only positive values are visible.
      • normals are calculated by sampling the field around the active pixel.
  • SH_PROC_BoidMesh
    • Procedurally generates quads out of boid instances.
    • Transforms boids from screen space to clip space.
  • UIUtilities
    • UI Utility classes and interfaces.
  • UISetting
    • UI ISetting interface implementation for setting instantiation.
  • UIHandler
    • Handles UI logic and toggles user input.
    • Acts as an interface between RootRenderer and UISetting.

gpuparticleplayground's People

Contributors

konstatoivanen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.