CQ_Intelligent-Technology-T.../Assets/GameAssets/Shader/TexChange.shader

69 lines
4.6 KiB
GLSL

// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "TexChange"
{
Properties
{
[Toggle]_Open("Open", Float) = 0
[Toggle]_TexSwitch("TexSwitch", Float) = 0
_Standard("", 2D) = "white" {}
_Switch("", 2D) = "white" {}
[HDR]_Col("Col", Color) = (1,1,1,0)
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" }
Cull Back
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard keepalpha addshadow fullforwardshadows
struct Input
{
float2 uv_texcoord;
};
uniform float _Open;
uniform float _TexSwitch;
uniform sampler2D _Standard;
uniform float4 _Standard_ST;
uniform sampler2D _Switch;
uniform float4 _Switch_ST;
uniform float4 _Col;
void surf( Input i , inout SurfaceOutputStandard o )
{
float4 color10 = IsGammaSpace() ? float4(0.1886792,0.1886792,0.1886792,0) : float4(0.02968646,0.02968646,0.02968646,0);
float2 uv_Standard = i.uv_texcoord * _Standard_ST.xy + _Standard_ST.zw;
float2 uv_Switch = i.uv_texcoord * _Switch_ST.xy + _Switch_ST.zw;
o.Emission = (( _Open )?( ( (( _TexSwitch )?( tex2D( _Switch, uv_Switch ) ):( tex2D( _Standard, uv_Standard ) )) * _Col ) ):( color10 )).rgb;
o.Alpha = 1;
}
ENDCG
}
Fallback "Diffuse"
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=18935
344;251;1241;523;1855.448;186.0704;1.961505;True;True
Node;AmplifyShaderEditor.SamplerNode;2;-1198.554,163.3247;Inherit;True;Property;_Standard;默认;2;0;Create;False;0;0;0;False;0;False;-1;None;aecd240c56ecead42ae6bd3eb151bf98;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;6;-1198.92,411.3273;Inherit;True;Property;_Switch;切换;3;0;Create;False;0;0;0;False;0;False;-1;None;d358ace2a99ccf5458716599b9ae3cbb;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;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;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ToggleSwitchNode;3;-778.3315,353.9409;Inherit;False;Property;_TexSwitch;TexSwitch;1;0;Create;True;0;0;0;False;0;False;0;True;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.ColorNode;8;-805.8124,592.1281;Inherit;False;Property;_Col;Col;4;1;[HDR];Create;True;0;0;0;False;0;False;1,1,1,0;2,2,2,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;7;-530.1854,488.3422;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.ColorNode;10;-609.8929,70.8867;Inherit;False;Constant;_Black;Black;3;0;Create;True;0;0;0;False;0;False;0.1886792,0.1886792,0.1886792,0;0.5773503,0.5773503,0.5773503,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ToggleSwitchNode;9;-265.5149,136.4368;Inherit;False;Property;_Open;Open;0;0;Create;True;0;0;0;False;0;False;0;True;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;0,0;Float;False;True;-1;2;ASEMaterialInspector;0;0;Standard;TexChange;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Opaque;0.5;True;True;0;False;Opaque;;Geometry;All;18;all;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;True;0;0;False;-1;0;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;True;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;False;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;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;3;0;2;0
WireConnection;3;1;6;0
WireConnection;7;0;3;0
WireConnection;7;1;8;0
WireConnection;9;0;10;0
WireConnection;9;1;7;0
WireConnection;0;2;9;0
ASEEND*/
//CHKSM=917931CFAAC5B2E77D2A81B7F0EB6C0009B7173C