mirror of
https://github.com/ApfelTeeSaft/Slender.git
synced 2026-09-02 12:03:36 +00:00
18 lines
436 B
C#
18 lines
436 B
C#
using UnityEngine;
|
|
|
|
[AddComponentMenu("Image Effects/Vortex")]
|
|
[ExecuteInEditMode]
|
|
public class VortexEffect : ImageEffectBase
|
|
{
|
|
public Vector2 radius = new Vector2(0.4f, 0.4f);
|
|
|
|
public float angle = 50f;
|
|
|
|
public Vector2 center = new Vector2(0.5f, 0.5f);
|
|
|
|
private void OnRenderImage(RenderTexture source, RenderTexture destination)
|
|
{
|
|
ImageEffects.RenderDistortion(base.material, source, destination, angle, center, radius);
|
|
}
|
|
}
|