예제 #1
0
        private void OnSceneEdit()
        {
            bool doPathTracingReset = true;

            // If we just change the sample count, we don't necessarily want to reset iteration
            if (m_PathTracingSettings && m_CacheMaxIteration != m_PathTracingSettings.maximumSamples.value)
            {
                m_RenderSky         = true;
                m_CacheMaxIteration = (uint)m_PathTracingSettings.maximumSamples.value;
                m_SubFrameManager.SelectiveReset(m_CacheMaxIteration);

#if ENABLE_UNITY_DENOISING_PLUGIN
                // We have to reset the status of any active denoisers so the denoiser will run again when we have max samples
                m_SubFrameManager.ResetDenoisingStatus();
#endif
                doPathTracingReset = false;
            }

#if ENABLE_UNITY_DENOISING_PLUGIN
            // If we just change the denoiser type, we don't necessarily want to reset iteration
            if (m_PathTracingSettings && m_CachedDenoiserType != m_PathTracingSettings.denoising.value)
            {
                m_CachedDenoiserType = m_PathTracingSettings.denoising.value;
                m_SubFrameManager.ResetDenoisingStatus();
                doPathTracingReset = false;
            }
#endif

            if (doPathTracingReset)
            {
                ResetPathTracing();
            }
        }
예제 #2
0
        private void InitPathTracingSettingsCache()
        {
            m_CacheMaxIteration = (uint)m_PathTracingSettings.maximumSamples.value;
#if ENABLE_UNITY_DENOISING_PLUGIN
            m_CachedDenoiserType = m_PathTracingSettings.denoising.value;
#endif
        }