95 lines
4.4 KiB
Plaintext
95 lines
4.4 KiB
Plaintext
|
|
// Made with Amplify Shader Editor
|
||
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||
|
|
Shader "JDJ/Effect_Add"
|
||
|
|
{
|
||
|
|
Properties
|
||
|
|
{
|
||
|
|
_liangdu("亮度", Float) = 1
|
||
|
|
[HDR]_Color("颜色", Color) = (1,1,1,1)
|
||
|
|
_Maintex("颜色贴图", 2D) = "white" {}
|
||
|
|
[HideInInspector] _texcoord( "", 2D ) = "white" {}
|
||
|
|
[HideInInspector] __dirty( "", Int ) = 1
|
||
|
|
}
|
||
|
|
|
||
|
|
SubShader
|
||
|
|
{
|
||
|
|
Tags{ "RenderType" = "TransparentCutout" "Queue" = "Transparent+0" "ForceNoShadowCasting" = "True" "IsEmissive" = "true" }
|
||
|
|
Cull Off
|
||
|
|
ZWrite Off
|
||
|
|
Blend One One
|
||
|
|
|
||
|
|
CGPROGRAM
|
||
|
|
#include "UnityPBSLighting.cginc"
|
||
|
|
#pragma target 3.0
|
||
|
|
#pragma multi_compile_instancing
|
||
|
|
#pragma surface surf StandardCustomLighting keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nofog nometa noforwardadd
|
||
|
|
struct Input
|
||
|
|
{
|
||
|
|
half2 uv_texcoord;
|
||
|
|
float4 vertexColor : COLOR;
|
||
|
|
};
|
||
|
|
|
||
|
|
struct SurfaceOutputCustomLightingCustom
|
||
|
|
{
|
||
|
|
half3 Albedo;
|
||
|
|
half3 Normal;
|
||
|
|
half3 Emission;
|
||
|
|
half Metallic;
|
||
|
|
half Smoothness;
|
||
|
|
half Occlusion;
|
||
|
|
half Alpha;
|
||
|
|
Input SurfInput;
|
||
|
|
UnityGIInput GIData;
|
||
|
|
};
|
||
|
|
|
||
|
|
uniform half4 _Color;
|
||
|
|
uniform sampler2D _Maintex;
|
||
|
|
uniform half4 _Maintex_ST;
|
||
|
|
uniform half _liangdu;
|
||
|
|
|
||
|
|
inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi )
|
||
|
|
{
|
||
|
|
UnityGIInput data = s.GIData;
|
||
|
|
Input i = s.SurfInput;
|
||
|
|
half4 c = 0;
|
||
|
|
c.rgb = 0;
|
||
|
|
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;
|
||
|
|
float2 uv_Maintex = i.uv_texcoord * _Maintex_ST.xy + _Maintex_ST.zw;
|
||
|
|
half4 tex2DNode1 = tex2D( _Maintex, uv_Maintex );
|
||
|
|
o.Emission = ( _Color * tex2DNode1 * i.vertexColor * i.vertexColor.a * _liangdu * tex2DNode1.a ).rgb;
|
||
|
|
}
|
||
|
|
|
||
|
|
ENDCG
|
||
|
|
}
|
||
|
|
Fallback "Legacy Shaders/Diffuse"
|
||
|
|
CustomEditor "ASEMaterialInspector"
|
||
|
|
}
|
||
|
|
/*ASEBEGIN
|
||
|
|
Version=16800
|
||
|
|
204;125;1603;827;1191.205;381.3289;1.076733;True;True
|
||
|
|
Node;AmplifyShaderEditor.ColorNode;5;-505.5,-124;Float;False;Property;_Color;Color;1;1;[HDR];Create;True;0;0;False;0;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.VertexColorNode;8;-458.5,259;Float;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.RangedFloatNode;10;-422.5,-254;Float;False;Property;_liangdu;liangdu;0;0;Create;True;0;0;False;0;1;1;0;0;0;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SamplerNode;1;-727.5,13;Float;True;Property;_Maintex;Main tex;2;0;Create;True;0;0;False;0;None;09a66bce4166b744eb5d570fdd029dff;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-217.5,-29;Float;False;6;6;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;116,-68;Half;False;True;2;Half;ASEMaterialInspector;0;0;CustomLighting;JDJ/Effect_Add;False;False;False;False;True;True;True;True;True;True;True;True;False;False;False;True;True;False;False;False;False;Off;2;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;True;TransparentCutout;;Transparent;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;4;1;False;-1;1;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;Legacy Shaders/Diffuse;3;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;7;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
|
||
|
|
WireConnection;6;0;5;0
|
||
|
|
WireConnection;6;1;1;0
|
||
|
|
WireConnection;6;2;8;0
|
||
|
|
WireConnection;6;3;8;4
|
||
|
|
WireConnection;6;4;10;0
|
||
|
|
WireConnection;6;5;1;4
|
||
|
|
WireConnection;0;2;6;0
|
||
|
|
ASEEND*/
|
||
|
|
//CHKSM=F92BFF1452A6C8D381C742B052C7207EAAADCE81
|