Research project aimed to deepen native 3D graphics knowledge. Unlike other projects this one is not using any 3d party engines or frameworks.
Developed Directx 11 forward rendering library from the scratch using C++ Visual Studio 2013 and Windows SDK 8.1. The library is targeting DX11 hardware with SM 5.0 and higher. No deprecated code from DX SDK is used. Below is the brief description of the library.
- Classes for cameras, shaders, materials, material properties, meshes, shader resources, samplers, render targets etc.
- Control over almost all pipeline functionality (rasterizer, depthstencil, blend, sampler states).
- Ability to render into separate render target, depth buffer, cube render target.
- Cameras can render objects with specific material (specific objects can override this behavior by providing their own materials). Useful for e.g. shadow mapping.
- Ability to do post effects.
- Simple lighting manager (dir and point lights; amount of lights is configurable and associated with shaders).
- Ability to set flags for object-camera, object-light relationship (e.g. you can render certain objects with certain cameras and lit certain objects with certain lights). Also camera can render directional shadow map for tagged objects.
- Automatic sorting of submitted items (camera -> opaque/transparent queues -> rendering order -> materials -> material properties). Material properties allow you to interface with shaders. You can specify constants for material constant buffer, set shader resources and samplers (Effects framework is not used); setting shader data is done using strings names (shader reflection is used for that).
- Support for vertex, pixel and geometry shaders.
- Dynamic hlsl shader linking which allows you to make your shaders to behave like uber-shader without having to recompile the hlsl code.
- Flexible mesh class which contains mesh buffer classes for vertices, indices and instances (i.e. support for HW instancing); you can choose usage for your mesh buffers (default, immutable, dynamic, but no staging), update them at runtime, change usage as required, control all aspects of DirectX Draw*** commands (start, count parameter for all buffers etc); mesh buffers can also keep copy of the data in the system memory (e.g. for calculating bounding box). Ability to load meshes from simple custom format external files.
- Flexible vertex layout creation (you can cache the layouts); materials control and set appropriate input layout for IA pipeline stage.
- You can specify MSAA for the swap chain, render target and depth buffer.
- Texture loading is done via DirectXTex library.
- DirectXMath simd library is used under the hood.
- Public interfaces does not contain any DirectX specific types