3 namespace droid.Runtime.Utilities.GameObjects.NeodroidCamera {
8 [RequireComponent(typeof(Camera))]
13 Color _background_color = Color.white;
15 [SerializeField] [Range(0, 1)]
float _blending = 0.5f;
21 [SerializeField] [Range(0, 100)]
float _overlay_amplitude = 60;
26 Shader _shader = null;
31 this.GetComponent<Camera>().depthTextureMode |= DepthTextureMode.Depth | DepthTextureMode.MotionVectors;
38 void OnRenderImage(RenderTexture source, RenderTexture destination) {
39 if (this._material == null) {
40 var shader = this._shader;
42 this._material =
new Material(shader) {hideFlags = HideFlags.DontSave};
46 var material = this._material;
47 if (material != null) {
48 material.SetColor(
"_BackgroundColor", this._background_color);
49 material.SetFloat(
"_Blending", this._blending);
50 material.SetFloat(
"_Amplitude", this._overlay_amplitude);
51 Graphics.Blit(source, destination, material);