Code Monkey home page Code Monkey logo

dx12base's Introduction

Dx12Base

dx12appscreenshot

A small DirectX 12 program I use to test shaders and techniques (so windows only). It is meant to be simple and straightforward. Nothing fancy to see here: plenty of engines already exist out there. This is just a thin abstraction over DX12 so it is still important to understand its core before using it. But it makes development of demos and prototypes easier for me at least. The DX11 version of this is available here.

Features are

  • Simple class helpers above DirectX 12.0 states and resources
  • Simple resource upload is in place for now. Utilies a given for per frame update of dynamic textures/buffers.
  • Simple RT support for mesh and material built in SBT with global and local shaders.
  • Simple PSO caching.
  • Live update of shaders with saving via ctrl+s
  • UI achieved with Dear ImGui
  • Performance measured with GPU timers and reported in UI (tested on intel and nvidia so far)
  • Simple window and input management (could be improved)
  • Easy to debug with RenderDoc or nSight for instance

When cloning the project the first time:

  1. Update submodules (run git submodule update)
  2. Open the solution
  3. In Visual Studio, change the Application project Working Directory from $(ProjectDir) to $(SolutionDir)
  4. Make sure you select a windows SDK and a platform toolset you have locally on your computer for both projects
  5. Copy dxcompiler.dll and dxil.dll from your windows SDK into $(SolutionDir) (I really need to fix that...)
  6. Select Application as the startup project, hit F5

Submodules

  • imgui V1.85 supported (change the submodule head to the commit corresponding to the version)

Have fun and do not hesitate to send back suggestions.

Seb

PS: example of what could be improved:

  • Better uploading code (do not allocate one uploading resource per texture/buffer)
  • Delayed resource deletion when not needed anymore
  • Better desriptors management (instead of a simple linear allocation without reuse of released elements)
  • Texture mip generation
  • Cubemap textures
  • Sparse textures
  • Mesh shaders
  • etc.

dx12base's People

Contributors

sebh 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

Watchers

 avatar  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.