This repository has been archived by the owner on Feb 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59f9ed9
commit 967da00
Showing
19 changed files
with
413 additions
and
3,711 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!74 &7400000 | ||
AnimationClip: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_Name: slideShine | ||
serializedVersion: 6 | ||
m_Legacy: 0 | ||
m_Compressed: 0 | ||
m_UseHighQualityCurve: 1 | ||
m_RotationCurves: [] | ||
m_CompressedRotationCurves: [] | ||
m_EulerCurves: [] | ||
m_PositionCurves: [] | ||
m_ScaleCurves: [] | ||
m_FloatCurves: | ||
- curve: | ||
serializedVersion: 2 | ||
m_Curve: | ||
- serializedVersion: 3 | ||
time: 0 | ||
value: 1 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
- serializedVersion: 3 | ||
time: 0.13333334 | ||
value: 1.3 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
- serializedVersion: 3 | ||
time: 0.26666668 | ||
value: 1 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
- serializedVersion: 3 | ||
time: 0.53333336 | ||
value: 1 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
m_PreInfinity: 2 | ||
m_PostInfinity: 2 | ||
m_RotationOrder: 4 | ||
attribute: material._Brightness | ||
path: | ||
classID: 212 | ||
script: {fileID: 0} | ||
m_PPtrCurves: | ||
- curve: | ||
- time: 0 | ||
value: {fileID: 2100000, guid: 6cea13e5ba8275446be27a38daed20c7, type: 2} | ||
attribute: m_Materials.Array.data[0] | ||
path: | ||
classID: 212 | ||
script: {fileID: 0} | ||
m_SampleRate: 60 | ||
m_WrapMode: 0 | ||
m_Bounds: | ||
m_Center: {x: 0, y: 0, z: 0} | ||
m_Extent: {x: 0, y: 0, z: 0} | ||
m_ClipBindingConstant: | ||
genericBindings: | ||
- serializedVersion: 2 | ||
path: 0 | ||
attribute: 2237670731 | ||
script: {fileID: 0} | ||
typeID: 212 | ||
customType: 22 | ||
isPPtrCurve: 0 | ||
- serializedVersion: 2 | ||
path: 0 | ||
attribute: 0 | ||
script: {fileID: 0} | ||
typeID: 212 | ||
customType: 21 | ||
isPPtrCurve: 1 | ||
pptrCurveMapping: | ||
- {fileID: 2100000, guid: 6cea13e5ba8275446be27a38daed20c7, type: 2} | ||
m_AnimationClipSettings: | ||
serializedVersion: 2 | ||
m_AdditiveReferencePoseClip: {fileID: 0} | ||
m_AdditiveReferencePoseTime: 0 | ||
m_StartTime: 0 | ||
m_StopTime: 0.53333336 | ||
m_OrientationOffsetY: 0 | ||
m_Level: 0 | ||
m_CycleOffset: 0.9 | ||
m_HasAdditiveReferencePose: 0 | ||
m_LoopTime: 1 | ||
m_LoopBlend: 0 | ||
m_LoopBlendOrientation: 0 | ||
m_LoopBlendPositionY: 0 | ||
m_LoopBlendPositionXZ: 0 | ||
m_KeepOriginalOrientation: 0 | ||
m_KeepOriginalPositionY: 1 | ||
m_KeepOriginalPositionXZ: 0 | ||
m_HeightFromFeet: 0 | ||
m_Mirror: 0 | ||
m_EditorCurves: | ||
- curve: | ||
serializedVersion: 2 | ||
m_Curve: | ||
- serializedVersion: 3 | ||
time: 0 | ||
value: 1 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
- serializedVersion: 3 | ||
time: 0.13333334 | ||
value: 1.3 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
- serializedVersion: 3 | ||
time: 0.26666668 | ||
value: 1 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
- serializedVersion: 3 | ||
time: 0.53333336 | ||
value: 1 | ||
inSlope: 0 | ||
outSlope: 0 | ||
tangentMode: 136 | ||
weightedMode: 0 | ||
inWeight: 0.33333334 | ||
outWeight: 0.33333334 | ||
m_PreInfinity: 2 | ||
m_PostInfinity: 2 | ||
m_RotationOrder: 4 | ||
attribute: material._Brightness | ||
path: | ||
classID: 212 | ||
script: {fileID: 0} | ||
m_EulerEditorCurves: [] | ||
m_HasGenericRootTransform: 0 | ||
m_HasMotionFloatCurves: 0 | ||
m_Events: [] |
2 changes: 1 addition & 1 deletion
2
Assets/Animation/WifiBreakShine.anim.meta → Assets/Animation/slideShine.anim.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Assets/Animation/Slide_Wifi.controller.meta → Assets/Animation/slideShine.controller.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
Shader "Custom/ColorAdjustEffect" | ||
{ | ||
Properties | ||
{ | ||
_MainTex("Albedo (RGB)", 2D) = "white" {} | ||
_Brightness("Brightness", Float) = 1 //调整亮度 | ||
_Saturation("Saturation", Float) = 1 //调整饱和度 | ||
_Contrast("Contrast", Float) = 1 //调整对比度 | ||
} | ||
|
||
SubShader | ||
{ | ||
Tags | ||
{ | ||
"Queue" = "Transparent" | ||
"RenderType" = "Transparent" | ||
} | ||
Pass | ||
{ | ||
ZTest Always | ||
Cull Off | ||
ZWrite Off | ||
Blend SrcAlpha OneMinusSrcAlpha | ||
CGPROGRAM | ||
sampler2D _MainTex; | ||
half _Brightness; | ||
half _Saturation; | ||
half _Contrast; | ||
|
||
//vert和frag函数 | ||
#pragma vertex vert | ||
#pragma fragment frag | ||
#include "Lighting.cginc" | ||
|
||
|
||
struct appdata_t | ||
{ | ||
float4 vertex : POSITION; | ||
half4 color : COLOR; | ||
float2 texcoord : TEXCOORD0; | ||
}; | ||
//从vertex shader传入pixel shader的参数 | ||
struct v2f | ||
{ | ||
float4 pos : SV_POSITION; //顶点位置 | ||
half2 uv : TEXCOORD0; //UV坐标 | ||
half4 color : COLOR; | ||
}; | ||
|
||
//vertex shader | ||
v2f vert(appdata_t v) | ||
{ | ||
v2f o; | ||
//从自身空间转向投影空间 | ||
o.pos = UnityObjectToClipPos(v.vertex); | ||
o.color = v.color; | ||
//uv坐标赋值给output | ||
o.uv = v.texcoord; | ||
return o; | ||
} | ||
|
||
//fragment shader | ||
fixed4 frag(v2f i) : COLOR | ||
{ | ||
//从_MainTex中根据uv坐标进行采样 | ||
fixed4 renderTex = tex2D(_MainTex, i.uv)*i.color; | ||
//brigtness亮度直接乘以一个系数,也就是RGB整体缩放,调整亮度 | ||
fixed3 finalColor = renderTex * _Brightness; | ||
//saturation饱和度:首先根据公式计算同等亮度情况下饱和度最低的值: | ||
fixed gray = 0.2125 * renderTex.r + 0.7154 * renderTex.g + 0.0721 * renderTex.b; | ||
fixed3 grayColor = fixed3(gray, gray, gray); | ||
//根据Saturation在饱和度最低的图像和原图之间差值 | ||
finalColor = lerp(grayColor, finalColor, _Saturation); | ||
//contrast对比度:首先计算对比度最低的值 | ||
fixed3 avgColor = fixed3(0.5, 0.5, 0.5); | ||
//根据Contrast在对比度最低的图像和原图之间差值 | ||
finalColor = lerp(avgColor, finalColor, _Contrast); | ||
//返回结果,alpha通道不变 | ||
return fixed4(finalColor, renderTex.a); | ||
} | ||
ENDCG | ||
} | ||
} | ||
//防止shader失效的保障措施 | ||
FallBack Off | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.