前言
还在苦于自己写的shader不能被sprite使用吗?
对,这个问题也困扰过我,所以我将它解决了。
然后顺便实现了简单抠图。。。。真的是简单抠图。。。
正文
按照习惯,首先放图,放代码。
这是抠图前。
抠图后。。。。分辨率比较低 ==
Shader "Sprites/Mine"
{
Properties
{
[PerRendererData]_MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Alpha Color Key", Color) = (0,0,0,1)
_Range("Range",Range (0,1.01))=0.1
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"=