MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / PreUpdatePathTracing

Method PreUpdatePathTracing

Rtxpt/Sample.cpp:1416–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1414}
1415
1416void Sample::PreUpdatePathTracing( bool resetAccum, nvrhi::CommandListHandle commandList )
1417{
1418 resetAccum |= m_ui.ResetAccumulation;
1419 resetAccum |= m_ui.RealtimeMode;
1420
1421 if (resetAccum)
1422 {
1423 m_accumulationSampleIndex = (m_ui.AccumulationPreWarmRealtimeCaches)?(-32):(0);
1424 }
1425#if ENABLE_DEBUG_VIZUALISATIONS
1426 if (resetAccum)
1427 m_shaderDebug->ClearDebugVizTexture(commandList);
1428#endif
1429
1430 // profile perf - only makes sense with high accumulation sample counts; only start counting after n-th after it stabilizes
1431 if( m_accumulationSampleIndex < 16 )
1432 {
1433 m_benchStart = std::chrono::high_resolution_clock::now( );
1434 m_benchLast = m_benchStart;
1435 m_benchFrames = 0;
1436 } else if( m_accumulationSampleIndex < m_ui.AccumulationTarget )
1437 {
1438 m_benchFrames++;
1439 m_benchLast = std::chrono::high_resolution_clock::now( );
1440 }
1441 m_accumulationCompleted = false;
1442 // 'min' in non-realtime path here is to keep looping the last sample for debugging purposes!
1443 if( !m_ui.RealtimeMode )
1444 {
1445 m_sampleIndex = (m_accumulationSampleIndex<0)?(m_accumulationSampleIndex+4096):(min(m_accumulationSampleIndex, m_ui.AccumulationTarget - 1));
1446 m_accumulationCompleted |= m_accumulationSampleIndex == m_ui.AccumulationTarget - 1;
1447 }
1448 else
1449 m_sampleIndex = (!m_ui.DbgFreezeRealtimeNoiseSeed)?( m_frameIndex % 8192 ):0; // actual sample index
1450}
1451
1452void Sample::PostUpdatePathTracing( )
1453{

Callers

nothing calls this directly

Calls 1

ClearDebugVizTextureMethod · 0.80

Tested by

no test coverage detected