DirectX 11 ECS Playground
Small DirectX renderer with an Entity Component System architecture.
Table of Contents
Building
You must download Visual Studio IDE and install the C++ package. Now you can open directx11-playground.sln
and build the app with f5
.
Examples
Basics
Triangle
A simple triangle. The only example that does not use indexed drawing.
Rotating cube
A rotating colored cube. Each face is independant so that the colors can be applied without smearing.
Textured primitives
Show some procedurally-generated primitives with their UV maps.
Model loading
Loads a GLTF model with its texture.
Skybox
[WIC]Show an environment in the background using a cubemap.
Global GUI
[WIC]Display a grid, some icons for the lights and a dynamic gizmo to always know the orientation of the camera.
Blinn-Phong shading
Directional light
Setup a simple scene with a directional light and no material. A menu is available to edit ambient, diffuse and specular properties.
Multiple light types
[WIC]Uses multiple point, directional and spotlights.
Materials
[WIC]Uses different objects with different materials applied to them to compare how they react to lighting.
Non-Photorealistic Rendering (NPR)
Gooch shading
[WIC]Change pixel color value from "cool to warm" based on normal direction angle from the camera.
Toon shading
[WIC]A rendering technique closer to traditional 2D animation.
Intermediate
Object picking
[WIC]Select objects on the scene with the mouse and raytracing.
View frustrum culling
[WIC]Do not render objects outside of the camera view.
Occlusion culling
[WIC]Do not render objects hidden by other ones.
High Dynamic Range
[WIC]Allows a rendered image to show more details when the scene contains both shadows and highlights.
Gamma correction
[WIC]Fix the gamma of the screen.
Normal mapping
[WIC]Show micro-geometry with lighting based on a texture.
Parallax mapping
[WIC]Adds micro-geometry to a model based on a texture.
Physically based rendering (PBR)
Directional light
[WIC]Base exemple of PBR.
Multiple light types
[WIC]Test multiple light types with PBR.
Materials
[WIC]Uses PBR materials.
Image based lighting (IBL)
[WIC]Local illumination technique based on the scene.
Screen-space subsurface scattering (SSS)
[WIC]Shows hows lights can traverse some materials.
Hair
[WIC]Render hair and fur.
Shadows
Directional shadow mapping
[WIC]Shadows created by a directional light.
Point shadow mapping
[WIC]Shadows created by point lights.
Screen space ambient occlusion (SSAO)
[WIC]Adds more shadows to micro-geometry based on vertex density.
Light map
[WIC]Baked global illumination based on raytracing.
Animations
Linear transform
[WIC]Basic translation and rotation loaded from gltf.
Squeletal animation
[WIC]A basic character movement loaded from gltf.
Post-Processing
Bloom
[WIC]Show a light with bloom effect.
Depth of field
[WIC]Blur the out of focus area of the image.
Motion blur
[WIC]Blur based on movement of the camera.
Advanced
Particle system
[WIC]Shows emissive particles.
Instanced rendering
[WIC]Render a forest.
Tesselation
[WIC]Shows how an object contains more or less geometry based on camera distance.
Deferred shading
[WIC]Improve lighting performance with geometry buffer.
Deferred plus shading
[WIC]Improve lighting performance in a forward shading pipeline by dividing the screen on multiple areas.