DX12 Raytracing Tutorial - Extras - Per Instance Data
Add a [perspective camera](dxr_tutorial_extra_perspective) to see it.  # Using a Constant Buffer Constant buffer are used to send read-only data from the CPU side to the shaders. Here we will create a constant buffer containing color data, used in the shader to alter the vertex colors. Add the declarations in the header file: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // #DXR Extra: Per-Instance Data void D3D12HelloTriangle::CreateGlobalConstantBuffer(); ComPtr