R1
This commit is contained in:
parent
37252a4edc
commit
19ab6f65e3
258 changed files with 406592 additions and 0 deletions
17
Assets/Scripts/CameraScript.cs
Normal file
17
Assets/Scripts/CameraScript.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue