mirror of
https://github.com/ApfelTeeSaft/Slender.git
synced 2026-09-02 12:03:36 +00:00
15 lines
382 B
C#
15 lines
382 B
C#
using UnityEngine;
|
|
|
|
[ExecuteInEditMode]
|
|
[AddComponentMenu("Image Effects/Edge Detection (Color)")]
|
|
public class EdgeDetectEffect : ImageEffectBase
|
|
{
|
|
public float threshold = 0.2f;
|
|
|
|
private void OnRenderImage(RenderTexture source, RenderTexture destination)
|
|
{
|
|
base.material.SetFloat("_Treshold", threshold * threshold);
|
|
Graphics.Blit(source, destination, base.material);
|
|
}
|
|
}
|