Advertisement
Guest User

DownsamplingMonoBehaviour

a guest
Jul 21st, 2015
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityStandardAssets.ImageEffects;
  4.  
  5. [ExecuteInEditMode]
  6. [RequireComponent (typeof (Camera))]
  7. public class DownSampling : ImageEffectBase
  8. {
  9.     public int Amount;
  10.  
  11.     [ImageEffectOpaque]
  12.     public void OnRenderImage(RenderTexture source, RenderTexture destination)
  13.     {
  14.         material.SetInt("_DownSampling", Amount);
  15.         Graphics.Blit(source, destination, material);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement