untiy C#
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class CamRendImage : MonoBehaviour {
[SerializeField]
private Material m_mat;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnRenderImage(RenderTexture src,RenderTexture dest)
{
Graphics.Blit (src,dest,m_mat);
}
void OnMouseDown()
{
}
void OnMouseUp()
{
}
}
unity Shader
Shader "Unlit/Flame"
{
Properties{
}
CGINCLUDE
#include "UnityCG.cginc"
#pragma target 3.0
#define vec2 float2
#define vec3 float3
#define vec4 float4
#define mat2 float2x2
#define mat3 float3x3
#define mat4 float4x4
#define iGlobalTime _Time.y
#define mod fmod
#define mix lerp
#define fract frac
#define texture2D tex2D
#define iResolution _ScreenParams
#define gl_FragCoord ((_iParam.scrPos.xy/_