Example #1
0
        /// <summary>
        /// Allocate a RTHandle from a regular render target identifier.
        /// </summary>
        /// <param name="texture">Input render target identifier.</param>
        /// <returns>A new RTHandle referencing the input render target identifier.</returns>
        public RTHandle Alloc(RenderTargetIdentifier texture)
        {
            var rth = new RTHandle(this);

            rth.SetTexture(texture);
            rth.m_EnableMSAA           = false;
            rth.m_EnableRandomWrite    = false;
            rth.useScaling             = false;
            rth.m_EnableHWDynamicScale = false;
            rth.m_Name = "";
            return(rth);
        }
Example #2
0
        /// <summary>
        /// Allocate a RTHandle from a regular Texture.
        /// </summary>
        /// <param name="texture">Input texture</param>
        /// <returns>A new RTHandle referencing the input texture.</returns>
        public RTHandle Alloc(Texture texture)
        {
            var rth = new RTHandle(this);

            rth.SetTexture(texture);
            rth.m_EnableMSAA           = false;
            rth.m_EnableRandomWrite    = false;
            rth.useScaling             = false;
            rth.m_EnableHWDynamicScale = false;
            rth.m_Name = texture.name;
            return(rth);
        }