Shader "Unlit/SelfLuminous"
{
Properties
{
_MyTexture("MyTexture", 2D) = "white" {}
[HDR]_MissClolor("MissClolor", Color) = (0,0,0,0)
_Rang("Rang", Range( 0 , 10)) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
Cull Back
CGPROGRAM
#include "UnityPBSLighting.cginc"
#pragma target 3.0
#pragma surface surf StandardCustomLighting keepalpha addshadow fullforwardshadows
struct Input
{
float2 uv_texcoord;
};
struct SurfaceOutputCustomLightingCustom
{
half3 Albedo;
half3 Normal;
half3 Emission;
half Metallic;
half Smoothness;
half Occlusion;
half Alpha;
Input SurfInput;
UnityGIInput GIData;
};
uniform sampler2D _MyTexture;
uniform float4 _MyTexture_ST;
uniform float4 _MissClolor;
uniform float _Rang;
inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi )
{
UnityGIInput data = s.GIData;
Input i = s.SurfInput;
half4 c = 0;
float2 uv_MyTexture = i.uv_texcoord * _MyTexture_ST.xy + _MyTexture_ST.zw;
float4 tex2DNode1 = tex2D( _MyTexture, uv_MyTexture );
c.rgb = ( tex2DNode1 * tex2DNode1.a * _MissClolor * _Rang ).rgb;
c.a = 1;
return c;
}
inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi )
{
s.GIData = data;
}
void surf( Input i , inout SurfaceOutputCustomLightingCustom o )
{
o.SurfInput = i;
}
ENDCG
}
Fallback "Diffuse"
}