| 136 | } |
| 137 | |
| 138 | void PixelStats::prepareProgram(const ref<Program>& pProgram, const ShaderVar& var) |
| 139 | { |
| 140 | FALCOR_ASSERT(mRunning); |
| 141 | |
| 142 | if (mEnabled) |
| 143 | { |
| 144 | pProgram->addDefine("_PIXEL_STATS_ENABLED"); |
| 145 | for (uint32_t i = 0; i < kRayTypeCount; i++) |
| 146 | { |
| 147 | var["gStatsRayCount"][i] = mpStatsRayCount[i]; |
| 148 | } |
| 149 | var["gStatsPathLength"] = mpStatsPathLength; |
| 150 | var["gStatsPathVertexCount"] = mpStatsPathVertexCount; |
| 151 | var["gStatsVolumeLookupCount"] = mpStatsVolumeLookupCount; |
| 152 | } |
| 153 | else |
| 154 | { |
| 155 | pProgram->removeDefine("_PIXEL_STATS_ENABLED"); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | void PixelStats::renderUI(Gui::Widgets& widget) |
| 160 | { |
no test coverage detected