jean-moreno / EdgeDetect-PostProcessingUnity

Unity legacy Edge Detect image effect ported to Post Processing Stack v2
296 stars 32 forks source link

Implemented UPM support and proper edge color support #14

Open popcron opened 5 years ago

popcron commented 5 years ago

The file structure was changed to allow the entire repository to be loaded into Unity via UPM with this single line into the manifest.json file:

"com.popcron.pp-edge-detection": "https://github.com/popcron/pp-edge-detection.git"

Classes were categorized into the correct namespace to follow consistency with the rest of the post processing effects. As such, to access the effect, you have to declare the namespace expliclity:

using UnityEngine.PostProcessing.Rendering;
...
if (profile.TryGetSettings(out EdgeDetect_BeforeTransparent edgeDetect))
{
    edgeDetect.enabled.Override(true);
}

The other change was to implement proper edge colour support for all edge detection modes. As showcased in this video.