diff options
author | chai <215380520@qq.com> | 2024-03-13 11:00:58 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2024-03-13 11:00:58 +0800 |
commit | 6ce8b9e22fc13be34b442c7b6af48b42cd44275a (patch) | |
tree | b38119d2acf0a982cb67e381f146924b9bfc3b3f /UnityEngine.PostProcessing/PostProcessingContext.cs |
+init
Diffstat (limited to 'UnityEngine.PostProcessing/PostProcessingContext.cs')
-rw-r--r-- | UnityEngine.PostProcessing/PostProcessingContext.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/UnityEngine.PostProcessing/PostProcessingContext.cs b/UnityEngine.PostProcessing/PostProcessingContext.cs new file mode 100644 index 0000000..ab810a1 --- /dev/null +++ b/UnityEngine.PostProcessing/PostProcessingContext.cs @@ -0,0 +1,39 @@ +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 bool isGBufferAvailable => camera.actualRenderingPath == RenderingPath.DeferredShading; + + public bool isHdr => camera.allowHDR; + + public int width => camera.pixelWidth; + + public int height => camera.pixelHeight; + + public Rect viewport => camera.rect; + + public void Interrupt() + { + interrupted = true; + } + + public PostProcessingContext Reset() + { + profile = null; + camera = null; + materialFactory = null; + renderTextureFactory = null; + interrupted = false; + return this; + } +} |