A framework for learning DirectX12 and demonstrate graphics techniques
Add protobuf to define pipeline setting
Add mutilthread asset loading
Refine Occulusion Culling : Should use reporjection from last frame and depth buffer to make the scene more stable
Texture Output
Compress Texture load
Decal
Volumetric Light : Draw light volume in ray marching or volume shape method
Terrain
1. Unit Tests: This part has a lot of little projects to test or demostrate the basic funcionality of this framework. The contents are:
- Triangle: Test basic vertex drawing and use texture
- Constant Buffer : Use constant buffer and change the value of constant buffer in every frame to move Triangle
- Index Buffer : Use Index draw to draw two triangle
- Structered Buffer : Use structered buffer and instanced_ID in HLSL to draw four triangle in one draw call
- Structered Buffer Write : Use structered buffer and compute shader to update the contents of structer buffer
- AppendConsumeBuffer : Use coounter for buffer that allow HLSL use append/consume in shader code
- Depth Test: Draw two triangle with reverse depth order and use depth as their color to make sure depth buffer work correctlly
- FrameBuffer: Draw the triagnel in the framebuffer and use this framebuffer as a texture of the triangle and draw it again
- Model Loading : Use assimp to load and draw obj file
- Gamma Correction : Test for gamma correction
- Skybox : Test TextureCube
- Root Constants : Draw four triangles with four draw call and use root constant to decide the position and color
- MipmapGenerate : Generate mipmap in CPU
- IrradianceCubeMap : Take a HDR Cube map and generate Irradiance Cube Map
- GPUParticles : Use Compute shaders to generate and update 1000000 particles https://www.youtube.com/watch?v=uF2_494RuAI
- GeometryShader: Take normal model, for each triagnel do some movement base on time and generate a small spike for each triangle https://www.youtube.com/watch?v=IpE9jaEErks
- BezierPlane : Use Perlin noise to generate different control points and use Bezier curve and tessellation to generate more detail information. The tessellation factor is based on the distance to the camera.https://www.youtube.com/watch?v=HxNtCPt5gPw&feature=youtu.be
- DispalcementMap : Use height map and tessellation shader to add more LOD on Models.The textures is from : https://freepbr.com https://www.youtube.com/watch?v=dcNFsgGAZaM
- Execute Indirect : Using execute indirect drawing 8000 spheres(1984 triangles for each sphere). Also using frustum culling to cull out the spheres that will not show in the camera frustum. https://www.youtube.com/watch?v=9GI294MPXeA&t=2s&index=10&list=PLvLvpclrF-V2Mdev5MhF7zl5RDFbaqnBF
- OcculusionQuery : An add up from unitest-19. Should be using query heap to query occulusion. But setPrediction works terriblly with execute indirect. Change to pixel shader approach to finish it. There will be disorder effect when camera moving to fast. This probally can be sovled by using bigger box? or other method. Can use more low resolution depth-buffer to gain more performance.
- GPUMipmapChain : Use compute shader to generate mipmaps offline
- DynamicUploadBuffer: Based on idea from Diligent Engine 2.0. via Egor Yusov. The article about it can be found :
https://www.gamasutra.com/blogs/EGORYUSOV/20160421/270974/Efficient_Implementation_of_Dynamic_Resources_in_Direct3D12.php - VolatileConstantBuffer: An alter version of unit test 22, but with 256byte alignment allocate. This is especially for constant buffer.
- TriplanarProjection : A preparation for Terrain rendering. This projection fix the most stretch problem with simple uv mapping. https://www.youtube.com/watch?v=5jGMriB03Xs&feature=youtu.be
- CubeMipMapChain : Use compute shader to generate cube map mipmaps offline
- NoiseTexture : Use compute shader to generate different types of noise texture. WIP a. Worley b. Perlin c. Octave d. Worley FBM e. Perlin + Worley
- IMGUI : add IMGUI
2. Graphics Techniques: Projects in this part is for demostaring some graphcis techniques(lighting, deffered shading...)
BRDF : Use Physics Basic Rendering to lit the scene and demostrate how different material looks like Shadow Map : Use one simple shadow map to demostrate the shadow for spot light OmniDirection Shadow Map : use cube mapping to demostrate the shadow for point light Deferred Shading : Draw all parameters that is need for lighting caculation to two render targets first. In next pass, calculate the lighting result by accessing the data from two render targets and depth buffer and draw on the screen. This demo aslo desmotrate use lighting volume can draw large number of lights in the scene. Imaged Based Lighting : Use enviroment map as light source. The method I used is from : https://learnopengl.com/#!PBR/IBL/Diffuse-irradiance Multiple Point Lights ShadowMap : Based on the method : Tile-Based Omnidirectional Shadows by Hawar Doghramachi. Which can be found in GPU Pro6. http://gpupro.blogspot.com/2014/12/gp... The whole scene consist with 128 point lights. The fame time is about 70ms. I use cube shadow map but make the whole pass with execute indirect to largely decrease the draw commands. Also I am adding the bloom effect. The bloom effect is learned from dx12 mini engine. https://www.youtube.com/watch?v=YpxZGnVfkb4&feature=youtu.be Cascaded shadow map : Use stable cascaded shadow map to largely add shadow quality, also combined with SMSR to decrease aliasing of shadows. SMSR can be found in :GPU Pro6: http://gpupro.blogspot.com This is directional light version. Each shadow maps resolution is 1024*1024 https://www.youtube.com/watch?v=plOWDfTVvpE&t=16s&list=PLvLvpclrF-V2Mdev5MhF7zl5RDFbaqnBF&index=12 Screen Space Refelction : Lern from the website : http://roar11.com/2015/07/screen-space-glossy-reflections/ . A good website to for Screen Space Hi-Z tracing http://bitsquid.blogspot.com/2017/08/notes-on-screen-space-hiz-tracing.html https://www.youtube.com/watch?v=sTAnvPJCINs&list=PLvLvpclrF-V2Mdev5MhF7zl5RDFbaqnBF&index=15&t=0s
Foward Plus: use depth buffer to cull lights out for little block area on the screen https://www.youtube.com/watch?v=OMG3N5X_wuo