forked from Unity-Technologies/EntityComponentSystemSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDepthOfFieldComponent.cs
More file actions
41 lines (34 loc) · 1.23 KB
/
Copy pathDepthOfFieldComponent.cs
File metadata and controls
41 lines (34 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
using UnityEngine.Rendering;
namespace UnityEngine.PostProcessing
{
// References :
// This DOF implementation use ideas from public sources, a big thank to them :
// http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
// http://www.crytek.com/download/Sousa_Graphics_Gems_CryENGINE3.pdf
// http://graphics.cs.williams.edu/papers/MedianShaderX6/
// http://http.developer.nvidia.com/GPUGems/gpugems_ch24.html
// http://vec3.ca/bicubic-filtering-in-fewer-taps/
public sealed class DepthOfFieldComponent : PostProcessingComponentCommandBuffer<DepthOfFieldModel>
{
const string k_ShaderString = "Hidden/Post FX/Depth Of Field";
public override bool active
{
get { return model.enabled; }
}
public override DepthTextureMode GetCameraFlags()
{
return DepthTextureMode.Depth;
}
public override string GetName()
{
return "Depth of Field";
}
public override CameraEvent GetCameraEvent()
{
return CameraEvent.BeforeImageEffectsOpaque;
}
public override void PopulateCommandBuffer(CommandBuffer cb)
{
}
}
}