1
0
Fork 0
This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Global-Game-Jam-2019/Assets/Scripts/CameraScript.cs
2019-01-27 14:54:55 +01:00

17 lines
434 B
C#

using UnityEngine;
public class CameraScript : MonoBehaviour
{
public Material material;
public FearLevel fear;
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
material.SetFloat("_Fear", fear.GetFearLevel());
// Copy the source Render Texture to the destination,
// applying the material along the way.
Graphics.Blit(source, destination, material);
}
}