PostProcessingComponent.cs
1.44 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
56
57
58
using UnityEngine.Rendering;
namespace UnityEngine.PostProcessing
{
public abstract class PostProcessingComponentBase
{
public PostProcessingContext context;
public virtual DepthTextureMode GetCameraFlags()
{
return DepthTextureMode.None;
}
public abstract bool active { get; }
public virtual void OnEnable()
{}
public virtual void OnDisable()
{}
public abstract PostProcessingModel GetModel();
}
public abstract class PostProcessingComponent<T> : PostProcessingComponentBase
where T : PostProcessingModel
{
public T model { get; internal set; }
public virtual void Init(PostProcessingContext pcontext, T pmodel)
{
context = pcontext;
model = pmodel;
}
public override PostProcessingModel GetModel()
{
return model;
}
}
public abstract class PostProcessingComponentCommandBuffer<T> : PostProcessingComponent<T>
where T : PostProcessingModel
{
public abstract CameraEvent GetCameraEvent();
public abstract string GetName();
public abstract void PopulateCommandBuffer(CommandBuffer cb);
}
public abstract class PostProcessingComponentRenderTexture<T> : PostProcessingComponent<T>
where T : PostProcessingModel
{
public virtual void Prepare(Material material)
{}
}
}