[M] edge foam display diff by pos

This commit is contained in:
2024-07-22 15:03:40 +08:00
parent c75c054ec3
commit 473cf573a8
3 changed files with 13 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ Material:
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _IntersectionNoise: - _IntersectionNoise:
m_Texture: {fileID: 0} m_Texture: {fileID: 2800000, guid: 6e4f6abf9612841adaf37e0d026dd5a4, type: 3}
m_Scale: {x: 1, y: 1} m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
- _MainTex: - _MainTex:
@@ -106,13 +106,13 @@ Material:
- _Glossiness: 0 - _Glossiness: 0
- _GlossyReflections: 0 - _GlossyReflections: 0
- _HorizonDistance: 26.6 - _HorizonDistance: 26.6
- _IntersectionClipping: 0.5 - _IntersectionClipping: 0.721
- _IntersectionDurationMulti1: 0.5 - _IntersectionDurationMulti1: 3.48
- _IntersectionDurationMulti2: 0.5 - _IntersectionDurationMulti2: 0.76
- _IntersectionFalloff: 0.525 - _IntersectionFalloff: 0.525
- _IntersectionLength: 2 - _IntersectionLength: 1.46
- _IntersectionSpeed: 1 - _IntersectionSpeed: -0.2
- _IntersectionTiling: 0.2 - _IntersectionTiling: 1.3
- _Metallic: 0 - _Metallic: 0
- _OcclusionStrength: 1 - _OcclusionStrength: 1
- _Parallax: 0.005 - _Parallax: 0.005
@@ -148,6 +148,7 @@ Material:
- _Direction: {r: 1, g: 1, b: 0, a: 0} - _Direction: {r: 1, g: 1, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _HorizonColor: {r: 0.09376113, g: 0.10980392, b: 0.32156864, a: 1} - _HorizonColor: {r: 0.09376113, g: 0.10980392, b: 0.32156864, a: 1}
- _IntersectionColor: {r: 1, g: 1, b: 1, a: 1}
- _ShallowColor: {r: 0.105882354, g: 0.4117647, b: 0.62352943, a: 0.9019608} - _ShallowColor: {r: 0.105882354, g: 0.4117647, b: 0.62352943, a: 0.9019608}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _WaveDirection: {r: 1, g: 1, b: 1, a: 2} - _WaveDirection: {r: 1, g: 1, b: 1, a: 2}

View File

@@ -107,11 +107,11 @@ Material:
- _GlossyReflections: 0 - _GlossyReflections: 0
- _HorizonDistance: 26.6 - _HorizonDistance: 26.6
- _InterscetionSpeed: 1 - _InterscetionSpeed: 1
- _IntersectionClipping: 0.717 - _IntersectionClipping: 0.741
- _IntersectionDurationMulti: 1 - _IntersectionDurationMulti: 1
- _IntersectionDurationMulti1: 3.45 - _IntersectionDurationMulti1: 3.45
- _IntersectionDurationMulti2: 1.45 - _IntersectionDurationMulti2: 1.45
- _IntersectionFalloff: 0.368 - _IntersectionFalloff: 0.5
- _IntersectionLength: 1.43 - _IntersectionLength: 1.43
- _IntersectionSpeed: -0.21 - _IntersectionSpeed: -0.21
- _IntersectionTiling: 1.27 - _IntersectionTiling: 1.27

View File

@@ -102,8 +102,8 @@ float4 ForwardPassFragment(Varyings input) : SV_Target
float interSecGradient = 1-saturate(exp(scene.verticalDepth) / _IntersectionLength); float interSecGradient = 1-saturate(exp(scene.verticalDepth) / _IntersectionLength);
float sine1 = sin(_TimeParameters.x * _IntersectionDurationMulti1 - interSecGradient ); float sine1 = sin(_TimeParameters.x * _IntersectionDurationMulti1 + positionWS.x - interSecGradient );
float sine2 = sin(_TimeParameters.x * _IntersectionDurationMulti2 - interSecGradient ); float sine2 = sin(_TimeParameters.x * _IntersectionDurationMulti2 + positionWS.z - interSecGradient );
float sine = sine1 * sine2 * interSecGradient; float sine = sine1 * sine2 * interSecGradient;
float2 nUV = positionWS.xz * _IntersectionTiling; float2 nUV = positionWS.xz * _IntersectionTiling;
@@ -164,8 +164,7 @@ float4 ForwardPassFragment(Varyings input) : SV_Target
// =================== Make ApplyLight simple ========================= // =================== Make ApplyLight simple =========================
finalColor = lerp(scene.color, finalColor, water.fog + interSecGradient); finalColor = lerp(scene.color, finalColor, water.fog + noise);
finalColor = lerp(scene.color, finalColor, 1);
return float4(finalColor, water.alpha); return float4(finalColor, water.alpha);
} }