- Vortex.cs
- Scripts /
- ImageEffects /
- Effects /
- Standard Assets /
- Assets /
- project /
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 }
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 }