38414
Assets/FR2_Cache.asset
38414
Assets/FR2_Cache.asset
File diff suppressed because it is too large
Load Diff
@@ -95,12 +95,17 @@ Material:
|
|||||||
m_Floats:
|
m_Floats:
|
||||||
- PixelSnap: 0
|
- PixelSnap: 0
|
||||||
- _AlphaClip: 0
|
- _AlphaClip: 0
|
||||||
|
- _AlphaPercent: 100
|
||||||
- _AlphaToMask: 0
|
- _AlphaToMask: 0
|
||||||
|
- _ApplyToAlphaLayer: 0
|
||||||
|
- _ApplyToSpecificColor: 0
|
||||||
- _Blend: 0
|
- _Blend: 0
|
||||||
- _BlendModePreserveSpecular: 1
|
- _BlendModePreserveSpecular: 1
|
||||||
- _BumpScale: 1
|
- _BumpScale: 1
|
||||||
- _ClearCoatMask: 0
|
- _ClearCoatMask: 0
|
||||||
- _ClearCoatSmoothness: 0
|
- _ClearCoatSmoothness: 0
|
||||||
|
- _ColorDriftAmount: 0
|
||||||
|
- _ColorDriftSpeed: 0
|
||||||
- _Cull: 2
|
- _Cull: 2
|
||||||
- _Cutoff: 0.5
|
- _Cutoff: 0.5
|
||||||
- _DetailAlbedoMapScale: 1
|
- _DetailAlbedoMapScale: 1
|
||||||
@@ -116,25 +121,34 @@ Material:
|
|||||||
- _Glossiness: 0
|
- _Glossiness: 0
|
||||||
- _GlossyReflections: 0
|
- _GlossyReflections: 0
|
||||||
- _GridScale: 0.0001
|
- _GridScale: 0.0001
|
||||||
|
- _HorizontalShake: 0
|
||||||
- _LineWidth: 2
|
- _LineWidth: 2
|
||||||
- _Metallic: 0
|
- _Metallic: 0
|
||||||
- _OcclusionStrength: 1
|
- _OcclusionStrength: 1
|
||||||
- _Parallax: 0.005
|
- _Parallax: 0.005
|
||||||
- _Plane: 0
|
- _Plane: 0
|
||||||
|
- _PulseSpeedPercent: 0
|
||||||
- _QueueOffset: 0
|
- _QueueOffset: 0
|
||||||
- _ReceiveShadows: 1
|
- _ReceiveShadows: 1
|
||||||
|
- _ReplaceImageColor: 0
|
||||||
|
- _RotateColors: 0
|
||||||
|
- _ScanLineJitterDisplacement: 0.33
|
||||||
|
- _ScanLineJitterThresholdPercent: 95
|
||||||
- _Smoothness: 0.5
|
- _Smoothness: 0.5
|
||||||
- _SmoothnessTextureChannel: 0
|
- _SmoothnessTextureChannel: 0
|
||||||
- _SpecularHighlights: 1
|
- _SpecularHighlights: 1
|
||||||
- _SrcBlend: 1
|
- _SrcBlend: 1
|
||||||
- _SrcBlendAlpha: 1
|
- _SrcBlendAlpha: 1
|
||||||
- _Surface: 0
|
- _Surface: 0
|
||||||
|
- _VerticalJumpAmount: 0
|
||||||
|
- _VerticalSpeed: 0
|
||||||
- _WorkflowMode: 1
|
- _WorkflowMode: 1
|
||||||
- _ZWrite: 1
|
- _ZWrite: 1
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _BackgroundColor: {r: 0, g: 0, b: 0, a: 0}
|
- _BackgroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _ColorToReplace: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
- _Flip: {r: 1, g: 1, b: 1, a: 1}
|
||||||
- _LineColor: {r: 0.3764706, g: 0.3764706, b: 0.3764706, a: 1}
|
- _LineColor: {r: 0.3764706, g: 0.3764706, b: 0.3764706, a: 1}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -24,7 +24,7 @@ MonoBehaviour:
|
|||||||
m_Value: 1
|
m_Value: 1
|
||||||
scatter:
|
scatter:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 0.8
|
m_Value: 0.696
|
||||||
clamp:
|
clamp:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 65472
|
m_Value: 65472
|
||||||
@@ -120,10 +120,10 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
|
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
|
||||||
m_Name: Tonemapping
|
m_Name: Tonemapping
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
active: 1
|
active: 0
|
||||||
mode:
|
mode:
|
||||||
m_OverrideState: 1
|
m_OverrideState: 1
|
||||||
m_Value: 1
|
m_Value: 0
|
||||||
neutralHDRRangeReductionMode:
|
neutralHDRRangeReductionMode:
|
||||||
m_OverrideState: 0
|
m_OverrideState: 0
|
||||||
m_Value: 2
|
m_Value: 2
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ MonoBehaviour:
|
|||||||
m_Active: 0
|
m_Active: 0
|
||||||
settings:
|
settings:
|
||||||
pixelateShader: {fileID: 4800000, guid: 272e7eef87baea8408e583d2670e66dd, type: 3}
|
pixelateShader: {fileID: 4800000, guid: 272e7eef87baea8408e583d2670e66dd, type: 3}
|
||||||
pixelateStrengthX: 1920
|
pixelateStrengthX: 1366
|
||||||
pixelateStrengthY: 1080
|
pixelateStrengthY: 768
|
||||||
passEvent: 500
|
passEvent: 500
|
||||||
--- !u!114 &11400000
|
--- !u!114 &11400000
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|||||||
89
Assets/Shaders/glitch_analog.shader
Normal file
89
Assets/Shaders/glitch_analog.shader
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
Shader "Custom/GlitchAnalog"
|
||||||
|
{
|
||||||
|
Properties
|
||||||
|
{
|
||||||
|
_MainTex ("Texture", 2D) = "white" {}
|
||||||
|
_GlitchIntensity ("Glitch Intensity", Range(0,1)) = 0.5
|
||||||
|
}
|
||||||
|
SubShader
|
||||||
|
{
|
||||||
|
Tags { "Queue"="Overlay" "RenderType"="Transparent" }
|
||||||
|
ZTest Always
|
||||||
|
ZWrite Off
|
||||||
|
Cull Off
|
||||||
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
|
float _GlitchIntensity;
|
||||||
|
|
||||||
|
struct appdata {
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
};
|
||||||
|
struct v2f {
|
||||||
|
float2 uv : TEXCOORD0;
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
};
|
||||||
|
v2f vert (appdata v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.uv = v.uv;
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
float nrand(float x, float y)
|
||||||
|
{
|
||||||
|
float2 p = float2(x, y);
|
||||||
|
float n = sin(dot(p, float2(12.9898, 78.233))) * 43758.5453;
|
||||||
|
n = frac(n);
|
||||||
|
n += frac(sin(dot(p * 2.0, float2(39.3468, 11.1351)) + _Time.y * 1.7) * 23421.631);
|
||||||
|
n += frac(sin(dot(p * 4.0, float2(73.1567, 52.2351)) - _Time.y * 2.3) * 12345.678);
|
||||||
|
return frac(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag (v2f i) : SV_Target
|
||||||
|
{
|
||||||
|
float2 uv = i.uv;
|
||||||
|
float4 rgba = tex2D(_MainTex, uv);
|
||||||
|
|
||||||
|
// 统一强度控制
|
||||||
|
float intensity = _GlitchIntensity;
|
||||||
|
|
||||||
|
// 色彩分离和撕裂
|
||||||
|
float chromaAmount = (0.01 + abs(sin(_Time.y * 1.3)) * 0.02) * intensity;
|
||||||
|
float tearStrength = (nrand(uv.y * 20.0 + _Time.y * 2.0, _Time.y * 1.3) - 0.5) * 0.15 * intensity;
|
||||||
|
|
||||||
|
float2 uvR = uv + float2(chromaAmount, 0) + float2(tearStrength, 0);
|
||||||
|
float2 uvG = uv + float2(0, 0) + float2(tearStrength * 0.5, 0);
|
||||||
|
float2 uvB = uv - float2(chromaAmount, 0) + float2(tearStrength, 0);
|
||||||
|
float r = tex2D(_MainTex, frac(uvR)).r;
|
||||||
|
float g = tex2D(_MainTex, frac(uvG)).g;
|
||||||
|
float b = tex2D(_MainTex, frac(uvB)).b;
|
||||||
|
float3 chromaColor = float3(r, g, b);
|
||||||
|
|
||||||
|
// 扫描线扰动
|
||||||
|
float scanJitter = (nrand(uv.y * 60.0, _Time.y * 0.5) - 0.5) * 0.2 * intensity;
|
||||||
|
float2 scanUV = uv + float2(scanJitter, 0);
|
||||||
|
float3 scanColor = tex2D(_MainTex, frac(scanUV)).rgb;
|
||||||
|
|
||||||
|
// 明暗扫描线效果
|
||||||
|
float scanLine = 0.85 + 0.15 * sin(uv.y * 800.0 + _Time.y * 10.0);
|
||||||
|
scanColor *= scanLine;
|
||||||
|
|
||||||
|
// 合成最终颜色
|
||||||
|
float3 finalColor = lerp(chromaColor, scanColor, 0.7 * intensity);
|
||||||
|
|
||||||
|
return float4(finalColor, rgba.a);
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Assets/Shaders/glitch_analog.shader.meta
Normal file
9
Assets/Shaders/glitch_analog.shader.meta
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 86d6c60b085e0614883c50daeecf890c
|
||||||
|
ShaderImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
defaultTextures: []
|
||||||
|
nonModifiableTextures: []
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user