GithubHelp home page GithubHelp logo

delt06 / dx12-renderer Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 4.0 85.92 MB

A DirectX 12 renderer featuring Deferred and Forward rendering paths, PBR, various post-processing effects, and more.

C++ 75.76% C 20.01% HLSL 2.32% CMake 1.90%
directx directx12 pbr renderer hdb meshlets occlusion-culling render-graph gpu-culling

dx12-renderer's Introduction

Toon RP

Hello there ๐Ÿ‘‹

I'm a Unity Developer and a Graphics Programmer (DX12, C++).

I currently work on Toon RP: a Unity Scriptable Render Pipeline (SRP) designed around stylized graphics.

dx12-renderer's People

Contributors

delt06 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

Watchers

 avatar  avatar  avatar

dx12-renderer's Issues

SSAO

  • Generate SSAO texture
  • Blur SSAO texture
    • Write to GBuffer's AO channel

GrassDemo

  • Many meshes (use execute indirect to cull the invisible ones)
    • 500k - works
    • 2kk - works
  • Set root constants (index of grass), access per-instance data via structured buffers

Test GPU Performance (1280x720, 500k colored cube instances):

Implementation Type Dispatch (ms) ExecuteIndirect (ms)
Constant Buffers 1.44 2.18
Index in 32 bit Constants, separate buffers for model and material 1.43 1.13
Index in 32 bit Constants, one buffer for all data, pass color as an interpolated attribute 1.43 1.42
  • Add actual grass mesh
  • AA
  • Vertex Animations
  • Random Placement
  • Chunks

Chunks performance test (Full HD, Release, 4000000 grass blades):

Mode FPS Increase
No Chunks 120 0%
9 Chunks 300 250%
16 Chunks 310 258%
25 Chunks 255 213%
  • Culling Toggle

Generic Shader and Material classes

  • All use the same CommonRootSignature
  • Materials store a map of material parameters
  • Shaders use reflection to figure out which how to map a uniform name to a root signature parameter
  • Refactor all demos to use this
    • DeferredLightingDemo
    • AnimationsDemo
    • LightingDemo
  • Profile and optimize (if possible) CPU performance

ToonDemo

  • Phong Shader
    • Diffuse
    • Specular
  • Add textured models
  • AA
  • Screen-Space Outlines
  • Anti-aliasing for outlines
  • Hard, crisp shadows
  • SSAO (via depth pre-pass)

TAA

  • Velocity Buffer
  • Jitter
  • History
  • Resolve

Deferred Lighting

  • GBuffer Pass
  • Light Passes
    • Directional
    • Point
      • Basis
      • Stencil logic
    • Spot
    • Capsule
    • Ambient

Shadow Mapping

  • Shadow casting
  • Shadow receiving
  • Pass biases in the constant buffer
  • Handle sampling outside UV range
  • PCF: 16-sample Poisson sampling with early bail
  • Automatic light projection matrix (using bounding volumes of game objects)
    • Idea
    • Create an AABB for the whole scene, make a naive bounding sphere for it
  • (Optional) Point Light shadows
    • Omnidirectional (cubemap) shadow map generation
    • Shadow receiving
    • Handle bias application in ShadowCaster_VertexShader. User a bool flag to distinguish
  • Update README with details and new screenshot

SSLR

  • Tracing
  • Binary search
  • Blur
  • Fading
  • Combine with cubemap reflections

Skinned Meshes

  • Load a model from FBX
  • Load bones and animations; play animations and draw bones
  • Load weights
  • Implement skinning in the vertex shader
  • State blending
  • State merging (i.e., avatar masks)
  • Update README: add links and info about the demo

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.