DX12 Raytracing Tutorial - Extras - Per Instance Data
Add a [perspective camera](dxr_tutorial_extra_perspective) to see it. ![Adding a plane in raytracing mode](https://d29g4g2dyqv443.cloudfront.net/sites/default/files/pictures/2018/dx12_rtx_tutorial/Extra/3TrianglesPlane.png) # 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