Ejemplo n.º 1
0
        public void Release()
        {
            CoreUtils.Destroy(m_MaterialFilterAreaLights);
            CoreUtils.Destroy(m_CubeToPanoMaterial);

            if (m_TempRenderTexture0 != null)
            {
                m_TempRenderTexture0.Release();
                m_TempRenderTexture0 = null;
            }
            if (m_TempRenderTexture1 != null)
            {
                m_TempRenderTexture1.Release();
                m_TempRenderTexture1 = null;
            }

            if (m_CookieAtlas != null)
            {
                m_CookieAtlas.Release();
                m_CookieAtlas = null;
            }
            if (m_CubeCookieTexArray != null)
            {
                m_CubeCookieTexArray.Release();
                m_CubeCookieTexArray = null;
            }
        }
Ejemplo n.º 2
0
        public void Release()
        {
            m_TextureCache.Release();
            CoreUtils.Destroy(m_TempRenderTexture);

            if (m_ConvolutionTargetTextureArray != null)
            {
                for (int bsdfIdx = 0; bsdfIdx < m_IBLFilterBSDF.Length; ++bsdfIdx)
                {
                    if (m_ConvolutionTargetTextureArray[bsdfIdx] != null)
                    {
                        CoreUtils.Destroy(m_ConvolutionTargetTextureArray[bsdfIdx]);
                        m_ConvolutionTargetTextureArray[bsdfIdx] = null;
                    }
                }
            }

            m_ProbeBakingState = null;

            CoreUtils.Destroy(m_ConvertTextureMaterial);
            CoreUtils.Destroy(m_CubeToPano);
        }