Global Game Jam 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
610 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteAlways]
public class ApplyImageEffect : MonoBehaviour
{
[SerializeField]
private Shader m_imageEffect;
[SerializeField]
private Material m_mat;
private void Awake()
{
if (m_imageEffect != null && m_mat == null)
{
m_mat = new Material(m_imageEffect);
}
}
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
if (m_mat != null)
{
Graphics.Blit(source, destination, m_mat);
}
}
}