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

Method computeRayCountTexture

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

Source from the content-addressed store, hash-verified

223 }
224
225 void PixelStats::computeRayCountTexture(RenderContext* pRenderContext)
226 {
227 FALCOR_ASSERT(mStatsBuffersValid);
228 if (!mpStatsRayCountTotal || mpStatsRayCountTotal->getWidth() != mFrameDim.x || mpStatsRayCountTotal->getHeight() != mFrameDim.y)
229 {
230 mpStatsRayCountTotal = mpDevice->createTexture2D(mFrameDim.x, mFrameDim.y, ResourceFormat::R32Uint, 1, 1, nullptr, ResourceBindFlags::ShaderResource | ResourceBindFlags::UnorderedAccess);
231 }
232
233 auto var = mpComputeRayCount->getRootVar();
234 for (uint32_t i = 0; i < kRayTypeCount; i++)
235 {
236 var["gStatsRayCount"][i] = mpStatsRayCount[i];
237 }
238 var["gStatsRayCountTotal"] = mpStatsRayCountTotal;
239 var["CB"]["gFrameDim"] = mFrameDim;
240
241 mpComputeRayCount->execute(pRenderContext, mFrameDim.x, mFrameDim.y);
242 mRayCountTextureValid = true;
243 }
244
245 const ref<Texture> PixelStats::getPathLengthTexture() const
246 {

Callers

nothing calls this directly

Calls 5

getWidthMethod · 0.80
getHeightMethod · 0.80
createTexture2DMethod · 0.80
getRootVarMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected