private void OnDestroy()
 {
     // cleanup
     _rtas.Release();
     _dxrTarget.Release();
     _accumulationTarget1.Release();
     _accumulationTarget2.Release();
 }
 void OnDestroy()
 {
     _AccelerationStructure.Release();
     _RenderTarget0.Release();
     _RenderTarget1.Release();
     _RenderTarget2.Release();
     Resources.UnloadUnusedAssets();
 }
Esempio n. 3
0
 private void ReleaseRTMannager()
 {
     if (TracingAccelerationStructure != null)
     {
         TracingAccelerationStructure.Release();
         TracingAccelerationStructure.Dispose();
         TracingAccelerationStructure = null;
     }
 }
    private void DestroyResources()
    {
        if (_rtTargetTexture != null)
        {
            _rtTargetTexture.Release();
            _rtTargetTexture = null;
        }

        if (_rtAccStructure != null)
        {
            _rtAccStructure.Release();
            _rtAccStructure = null;
        }
    }
    private void ReleaseResources()
    {
        if (rayTracingAccelerationStructure != null)
        {
            rayTracingAccelerationStructure.Release();
            rayTracingAccelerationStructure = null;
        }

        if (rayTracingOutput != null)
        {
            rayTracingOutput.Release();
            rayTracingOutput = null;
        }

        cameraWidth  = 0;
        cameraHeight = 0;
    }