ShanxiKnowledgeBase/SXElectricityFaultA&E/Assets/Shader/JZQRuning.shader

71 lines
4.1 KiB
GLSL

// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "JZQRuning"
{
Properties
{
_LightSpeed("", Range( 0 , 5)) = 1
[HDR]_LightCol("", Color) = (1,0.9048885,0,0)
[HDR]_BaseCol("", Color) = (0.1509434,0.1509434,0.1509434,0)
[Toggle]_LightSwitch("", Float) = 0
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" }
Cull Back
CGPROGRAM
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#pragma surface surf Standard keepalpha addshadow fullforwardshadows
struct Input
{
half filler;
};
uniform float4 _BaseCol;
uniform float _LightSwitch;
uniform float4 _LightCol;
uniform float _LightSpeed;
void surf( Input i , inout SurfaceOutputStandard o )
{
o.Albedo = _BaseCol.rgb;
float4 temp_cast_1 = (0.0).xxxx;
float mulTime5 = _Time.y * _LightSpeed;
float4 clampResult10 = clamp( ( _LightCol * sin( mulTime5 ) ) , float4( 0,0,0,0 ) , _LightCol );
o.Emission = (( _LightSwitch )?( clampResult10 ):( temp_cast_1 )).rgb;
o.Alpha = 1;
}
ENDCG
}
Fallback "Diffuse"
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=18935
315;608;1241;466;1272.388;-147.6813;1;True;True
Node;AmplifyShaderEditor.RangedFloatNode;6;-1665.496,578.384;Inherit;False;Property;_LightSpeed;闪烁速度;0;0;Create;False;0;0;0;False;0;False;1;0;0;5;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleTimeNode;5;-1394.571,583.9556;Inherit;False;1;0;FLOAT;2;False;1;FLOAT;0
Node;AmplifyShaderEditor.SinOpNode;4;-1209.687,584.515;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ColorNode;1;-1252.251,317.8704;Inherit;False;Property;_LightCol;闪烁颜色;1;1;[HDR];Create;False;0;0;0;False;0;False;1,0.9048885,0,0;1,0.9048885,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;2;-1006.541,441.9645;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.RangedFloatNode;9;-573.0672,266.1389;Inherit;False;Constant;_LightSpeed1;不闪烁;0;0;Create;False;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.ClampOpNode;10;-567.6174,373.9973;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;1,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.ColorNode;7;-1018.402,117.6524;Inherit;False;Property;_BaseCol;基础颜色;2;1;[HDR];Create;False;0;0;0;False;0;False;0.1509434,0.1509434,0.1509434,0;1,0.9048885,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ToggleSwitchNode;8;-328.0026,287.7224;Inherit;True;Property;_LightSwitch;打开;3;0;Create;False;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;JZQRuning;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;5;0;6;0
WireConnection;4;0;5;0
WireConnection;2;0;1;0
WireConnection;2;1;4;0
WireConnection;10;0;2;0
WireConnection;10;2;1;0
WireConnection;8;0;9;0
WireConnection;8;1;10;0
WireConnection;0;0;7;0
WireConnection;0;2;8;0
ASEEND*/
//CHKSM=0AAD4448151C4DC54CB96F9697BA9AA15A64F96A