UnityMol  0.9.6-875
UnityMol viewer / In developement
Twirl.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/Twirl")]
8  public class Twirl : ImageEffectBase
9  {
10  public Vector2 radius = new Vector2(0.3F,0.3F);
11  [Range(0.0f,360.0f)]
12  public float angle = 50;
13  public Vector2 center = new Vector2 (0.5F, 0.5F);
14 
15 
16  // Called by camera to apply image effect
17  void OnRenderImage (RenderTexture source, RenderTexture destination)
18  {
19  ImageEffects.RenderDistortion (material, source, destination, angle, center, radius);
20  }
21  }
22 }
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: Twirl.cs:17