MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / prepareProgram

Method prepareProgram

Source/Falcor/Rendering/Utils/PixelStats.cpp:138–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 4

generateCandidatesMethod · 0.45
spatialResamplingMethod · 0.45
temporalResamplingMethod · 0.45

Calls 2

addDefineMethod · 0.45
removeDefineMethod · 0.45

Tested by

no test coverage detected