forked from Unity-Technologies/EntityComponentSystemSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPostProcessingContext.cs
More file actions
executable file
·55 lines (46 loc) · 1.23 KB
/
Copy pathPostProcessingContext.cs
File metadata and controls
executable file
·55 lines (46 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
{
get { return camera.allowHDR; }
}
public int width
{
get { return camera.pixelWidth; }
}
public int height
{
get { return camera.pixelHeight; }
}
public Rect viewport
{
get { return camera.rect; } // Normalized coordinates
}
#endregion
}
}