Today, we are excited to announce that we are releasing Cauldron 1.0.

Cauldron is a framework for rapid prototyping that will be used in AMD SDK samples and effects. It supports Direct3D 12 and Vulkan®. If you want to go straight to the features and screenshots page go to Cauldron’s project page, then come back here to get a few more details!

Cauldron takes care of the typical operations required to render something on the screen, such as creating and opening a window, loading and displaying a glTF 2.0 model, and applying some post-processing. It is like having a simplified game engine that you can learn and modify in little time.

Cauldron has been designed to be both accessible for those who are still learning, and flexible for those who want to extend it with new features.  In fact Cauldron was first written for Direct3D 12 and ported later on to Vulkan without much effort. Given that Cauldron supports two API implementations, an interesting exercise is to diff between them to see how API calls translate to each other. Cauldron is an excellent resource for those who already know one of those two APIs and want to learn the other.

After its initial internal release Cauldron quickly went viral inside AMD and ended up being adopted by other teams, such as tools, drivers and demo teams. We hope that it will find similar adoption from the programming community!

Cauldron uses vanilla C++ and aims to follow a ‘one feature, one class, one file’ philosophy; that way you don’t need to jump around many files in order to understand how something works. Whenever possible most of the classes will implement the following methods:


class MyTechnique
{
bool OnCreate(…); //creates the pipelines, static geometry, and other one-time initializations
void OnDestroy(…);
void OnDraw(…) // use the created resources to draw the technique
}

Two techniques are needed to render glTF 2.0 models, one technique for the PBR pass and another for the Depth-Only pass. Hence we will find two classes called GltfPbrPass and GltfDepthPass. The data of a glTF model is split in three files:

  1. GltfCommon, an API-agnostic class that loads and takes care of the transformation and animation of the scene, including skinning.
  2. GltfTexturesAndBuffers, a class that loads and holds all the textures, skinning matrices and geometry buffers.
  3. GltfPbrPass and GltfDepthPass, two classes that use the above classes to render the scene with the mentioned techniques.

Since Cauldron includes both graphics-agnostic and graphics-dependent code we can split the framework in three Visual Studio projects:

  1. Framework_DX12: contains all the Direct3D 12 code
  2. Framework_VK: contains all the Vulkan code
  3. Framework_Common: contains all the common code for the two above projects.
    • GLTF structures
    • Transformation and animation code
    • Loading images
    • Window handling
    • Camera
    • Etc.

The post-processing techniques supported (bloom, blur, downsampling and tonemapping) introduce two new members that help create temporary render targets.


bool OnCreateWindowSizeDependentResources(…) // creates temporary render targets needed for the effect
void OnDestroyWindowSizeDependentResources(…)

If you want to implement things at a lower level you can still do it and even use some of the following memory managers to help you:

  1. StaticBufferPool, holds your static data, featuring suballocation too.
  2. DynamicBufferRing, a circular buffer used mainly for constant buffers.
  3. Texture, which allows the loading of textures and creation of render targets, including creating views for them.
  4. ShaderCompilerHelper, which takes care of compiling source code and caching the binaries so loading times are as quick as possible.
  5. UploadHeap, which allows you to suballocate from a system memory pool to upload data (textures and buffers) to a video memory buffer.

Note that those implementations are optimized for ease of use and readability so that all users feel comfortable understanding the code and extending it.

Cauldron is provided on GPUOpen under the MIT open source license. We are looking forward to your feedback!