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         
public float angle = 50;
12         
public Vector2 center = new Vector2 (0.5F, 0.5F);
13
14
15         
// Called by camera to apply image effect
16         
void OnRenderImage (RenderTexture source, RenderTexture destination)
17         {
18             ImageEffects.RenderDistortion (material, source, destination, angle, center, radius);
19         }
20     }
21 }


Called by camera to apply image effect



Gõ tìm kiếm nhanh...