我正在使用Unity游戏引擎创建iOS应用程序。
我试图重写我的着色器,以使使用它的材质具有泛光效果(类似于Halo组件)。
以下是所需效果的示例:
我在互联网上搜索了答案,但没有找到适合解决我的问题的工作人员或合适的解决方案。
我的着色器代码:
Shader "Unlit"
{
Properties
{
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
_Color("Main Color", Color) = (1, 1, 1, 1)
}
SubShader
{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
LOD 100
Cull off
ZWrite on
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
Lighting Off
SetTexture[_MainTex]
{
constantColor[_Color]
Combine texture * constant, texture * constant
}
}
}
}