UnityMol  0.9.6-875
UnityMol viewer / In developement
Vortex.cs
Go to the documentation of this file.
1 using System;
2 using UnityEngine;
3 
4 namespace UnityStandardAssets.ImageEffects
5 {
6  [ExecuteInEditMode]
7  [AddComponentMenu("Image Effects/Displacement/Vortex")]
8  public class Vortex : ImageEffectBase
9  {
10  public Vector2 radius = new Vector2(0.4F,0.4F);
11  public float angle = 50;
12  public Vector2 center = new Vector2(0.5F, 0.5F);
13 
14  // Called by camera to apply image effect
15  void OnRenderImage (RenderTexture source, RenderTexture destination)
16  {
17  ImageEffects.RenderDistortion (material, source, destination, angle, center, radius);
18  }
19  }
20 }
A Utility class for performing various image based rendering tasks.
Definition: ImageEffects.cs:8
static void RenderDistortion(Material material, RenderTexture source, RenderTexture destination, float angle, Vector2 center, Vector2 radius)
Definition: ImageEffects.cs:10
void OnRenderImage(RenderTexture source, RenderTexture destination)
Definition: Vortex.cs:15