| 44 | } |
| 45 | |
| 46 | RtBindingTable::RtBindingTable(uint32_t missCount, uint32_t rayTypeCount, uint32_t geometryCount) |
| 47 | : mMissCount(missCount), mRayTypeCount(rayTypeCount), mGeometryCount(geometryCount) |
| 48 | { |
| 49 | FALCOR_CHECK(missCount <= kMaxMissCount, "'missCount' exceeds the maximum supported ({})", kMaxMissCount); |
| 50 | FALCOR_CHECK(rayTypeCount <= kMaxRayTypeCount, "'rayTypeCount' exceeds the maximum supported ({})", kMaxRayTypeCount); |
| 51 | size_t recordCount = 1ull + missCount + rayTypeCount * geometryCount; |
| 52 | FALCOR_CHECK(recordCount <= std::numeric_limits<uint32_t>::max(), "Raytracing binding table is too large"); |
| 53 | |
| 54 | // Create the binding table. All entries will be assigned a null shader initially. |
| 55 | mShaderTable.resize(recordCount); |
| 56 | } |
| 57 | |
| 58 | void RtBindingTable::setRayGen(ShaderID shaderID) |
| 59 | { |