A simple framework for rapid prototyping on Vulkan or DirectX12.
Cauldron was developed by AMD and is used internally to develop prototypes, demos and SDK samples.
Cauldron is compiled as a static library, hence the sample application has to statically link against it.
Sample Projects & Screenshots
- glTFSample, a simple demo app to show off Cauldron's features
- glTF 2.0 File loader
- Animation for cameras, objects, skeletons and lights
- PBR Materials
- Specular-Glossiness (KHR_materials_pbrSpecularGlossiness)
- Lighting (KHR_lights_punctual extension)
- Spot Lights w/ Shadows (up to 4)
- Image-based Lighting (IBL) CubeMaps
- Texture Loaders for DDS, JPEG and PNG formats
- MipMap generation for powers-of-two textures
- In-app user interface using Dear ImGui
- Rendering Resource Management
- Command Buffer Ring
- Timestamp Queries
- Memory Heap Manager (Linear Allocator)
- Static buffers for VB/IB/CB with suballocation support
- Dynamic buffers for VB/IB/CB using a ring buffer
- Debug Rendering
- Wireframe Bounding Boxes
- Light Frustums
- Window management & swapchain creation
- Fullscreen/Windowed Modes
- Support for DXC/SM6.x
- Shader Binary & PSO caching
build: Build scripts & generated solution files/folders
AGS: AMD helper library for querying GPU info
VulkanMemoryAllocator: Helper library for memory management with Vulkan applications
d3d12x: The D3D12 helper library
dxc: DirectX Shader Compiler
imgui: Graphical User Interface library
json: Library for adding JSON support w/ C++ syntax
media: Builtin textures and other data
src: Source code files
Note: more info on the rendering backends can be found in the Readme of their respective folders.
- Run the
GenerateSolutions.batfile in the
build/DX12folders will contain the
- Simply build the solution file for the desired API
build/DX12/src/DX12/directory will contain the compiled static library
Framework_DX12.libfor DX12 (similar for VK) under the selected configuration (Debug/Release) folder.
Every feature in Cauldron has been implemented in a single file using C++11.
The main features could be grouped in 4 categories:
- Resource managers & loaders
- Texture loaders - can load
JPGand any other file supported by the WIC subsystem. It can also create image views.
- StaticBufferPool - holds vertices and indices for static geometry. It creates a huge buffer and then suballocates chunks from it in a linear fashion. Chunks cannot be freed.
- DynamicBufferRing - holds constant buffers and also vertices and indices. Same as before but allocation happens in a ring fashion.
- ResourceViewHeaps - holds the Descriptor Sets.
- UploadHeap - system memory buffer that holds the texture data to be uploaded to video memory via DMA
- CommandListRing - allocates a number of command buffers from a ring buffer and returns a ready-to-use command buffer.
- Device - all the device related code.
- Texture loaders - can load
- GLTF* - loads and renders the model
- PostProcPS/PS - draws a 2D quad using a custom shader, used by the post processing passes.
- ImGUI - code for driving the ImGUI
- Wireframe - draws a wireframe cube (used for rendering bounding boxes and light/camera frustums)
- Axis - draws the coordinate axis of a matrix
- Vulkan specific helpers & setup code
- InstanceVK - creates an instance and enables the validation layer
- DebugMarkersExtVk - sets up the debug markers
- Commons & OS-specific code
- Swapchain - handles resizing, fullscreen/windowed modes, etc.
- FrameworkWindows - creates a window, processes windows message pump
Cauldron was originally written using DX12 and later on ported to Vulkan using the same structure. This would make Cauldron ideal for learning Vulkan if you're coming from DirectX12, or vice versa.
Please bear in mind that in order to keep Cauldron simple we are only covering the most frequently used features (for now).
Please feel free to open an issue for bug reports.
Cauldron should be very easy to extend, should you want to contribute to Cauldron, you can open a merge request.