少年修仙传客户端基础资源
leonard Wu
2018-08-09 a10eea6e4ce647061813519d5b0ea496f29495b9
Assets/Plugins/PostProcessing/Runtime/PostProcessingContext.cs
@@ -1,60 +1,60 @@
namespace UnityEngine.PostProcessing
{
    public class PostProcessingContext
    {
        public PostProcessingProfile profile;
        public Camera camera;
        public MaterialFactory materialFactory;
        public RenderTextureFactory renderTextureFactory;
        public bool interrupted { get; private set; }
        public void Interrupt()
        {
            interrupted = true;
        }
        public PostProcessingContext Reset()
        {
            profile = null;
            camera = null;
            materialFactory = null;
            renderTextureFactory = null;
            interrupted = false;
            return this;
        }
        #region Helpers
        public bool isGBufferAvailable
        {
            get { return camera.actualRenderingPath == RenderingPath.DeferredShading; }
        }
        public bool isHdr
        {
            // No UNITY_5_6_OR_NEWER defined in early betas of 5.6
#if UNITY_5_6 || UNITY_5_6_OR_NEWER
            get { return camera.allowHDR; }
#else
            get { return camera.hdr; }
#endif
        }
        public int width
        {
            get { return camera.pixelWidth; }
        }
        public int height
        {
            get { return camera.pixelHeight; }
        }
        public Rect viewport
        {
            get { return camera.rect; } // Normalized coordinates
        }
        #endregion
    }
}
namespace UnityEngine.PostProcessing
{
    public class PostProcessingContext
    {
        public PostProcessingProfile profile;
        public Camera camera;
        public MaterialFactory materialFactory;
        public RenderTextureFactory renderTextureFactory;
        public bool interrupted { get; private set; }
        public void Interrupt()
        {
            interrupted = true;
        }
        public PostProcessingContext Reset()
        {
            profile = null;
            camera = null;
            materialFactory = null;
            renderTextureFactory = null;
            interrupted = false;
            return this;
        }
        #region Helpers
        public bool isGBufferAvailable
        {
            get { return camera.actualRenderingPath == RenderingPath.DeferredShading; }
        }
        public bool isHdr
        {
            // No UNITY_5_6_OR_NEWER defined in early betas of 5.6
#if UNITY_5_6 || UNITY_5_6_OR_NEWER
            get { return camera.allowHDR; }
#else
            get { return camera.hdr; }
#endif
        }
        public int width
        {
            get { return camera.pixelWidth; }
        }
        public int height
        {
            get { return camera.pixelHeight; }
        }
        public Rect viewport
        {
            get { return camera.rect; } // Normalized coordinates
        }
        #endregion
    }
}