using System;
using UnityEngine;

// Token: 0x0200005D RID: 93
public class CameraFogOfWar : MonoBehaviour
{
	// Token: 0x06000B43 RID: 2883 RVA: 0x000DD4AF File Offset: 0x000DB6AF
	private void Start()
	{
	}

	// Token: 0x06000B44 RID: 2884 RVA: 0x000DD4B1 File Offset: 0x000DB6B1
	private void OnEnable()
	{
	}

	// Token: 0x06000B45 RID: 2885 RVA: 0x000DD4B3 File Offset: 0x000DB6B3
	private void OnDisable()
	{
	}

	// Token: 0x06000B46 RID: 2886 RVA: 0x000DD4B8 File Offset: 0x000DB6B8
	private void OnRenderImage(RenderTexture src, RenderTexture dest)
	{
		if (!this.cam)
		{
			this.cam = Camera.main;
		}
		if (this.cam)
		{
			Matrix4x4 cameraToWorldMatrix = this.cam.cameraToWorldMatrix;
			Shader.SetGlobalMatrix("_CamToWorld", this.cam.cameraToWorldMatrix);
			if (!this.fogMaterial)
			{
				this.fogMaterial = new Material(Shader.Find("Hannah/FogOfWar"));
			}
			Graphics.Blit(src, dest, this.fogMaterial);
		}
	}

	// Token: 0x04001046 RID: 4166
	private Material fogMaterial;

	// Token: 0x04001047 RID: 4167
	private Camera cam;
}
