闪烁灯光材质
This commit is contained in:
parent
925e787d89
commit
830011f6d8
|
|
@ -0,0 +1,34 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: JZQRuning
|
||||
m_Shader: {fileID: 4800000, guid: e58f89048170cf74cb689b90a92e607b, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _LightSpeed: 1
|
||||
- _LightSwitch: 0
|
||||
- __dirty: 1
|
||||
m_Colors:
|
||||
- _BaseCol: {r: 0.1509434, g: 0.1509434, b: 0.1509434, a: 0}
|
||||
- _LightCol: {r: 1, g: 0.9048885, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dbbdfa8bb0130fc4f93527f4c27decee
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
// 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
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e58f89048170cf74cb689b90a92e607b
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue