From cdfd57714ea825977201f84b8bcf069f09e58e34 Mon Sep 17 00:00:00 2001 From: tech Date: Mon, 22 Jul 2024 15:28:47 +0800 Subject: [PATCH] [M] foam add color --- Packages/zzwater/Mats/Ocean_tess.mat | 4 ++-- Packages/zzwater/shaders/libs/ForwardPass.hlsl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Packages/zzwater/Mats/Ocean_tess.mat b/Packages/zzwater/Mats/Ocean_tess.mat index 2bcaf0c..2be9166 100644 --- a/Packages/zzwater/Mats/Ocean_tess.mat +++ b/Packages/zzwater/Mats/Ocean_tess.mat @@ -107,11 +107,11 @@ Material: - _GlossyReflections: 0 - _HorizonDistance: 26.6 - _InterscetionSpeed: 1 - - _IntersectionClipping: 0.741 + - _IntersectionClipping: 0.735 - _IntersectionDurationMulti: 1 - _IntersectionDurationMulti1: 3.45 - _IntersectionDurationMulti2: 1.45 - - _IntersectionFalloff: 0.5 + - _IntersectionFalloff: 0.451 - _IntersectionLength: 1.43 - _IntersectionSpeed: -0.21 - _IntersectionTiling: 1.27 diff --git a/Packages/zzwater/shaders/libs/ForwardPass.hlsl b/Packages/zzwater/shaders/libs/ForwardPass.hlsl index 7eb9bfd..5777c59 100644 --- a/Packages/zzwater/shaders/libs/ForwardPass.hlsl +++ b/Packages/zzwater/shaders/libs/ForwardPass.hlsl @@ -111,10 +111,10 @@ float4 ForwardPassFragment(Varyings input) : SV_Target float noise = SAMPLE_TEXTURE2D(_IntersectionNoise, sampler_IntersectionNoise, nUV + TIME_VERTEX/_IntersectionTiling * _IntersectionSpeed).r; noise = saturate(noise + sine) * dist + dist; - //noise = smoothstep(_IntersectionClipping, 1, noise); - noise = step(_IntersectionClipping, noise); + noise = smoothstep(_IntersectionClipping, 1, noise); + //noise = step(_IntersectionClipping, noise); - //water.albedo.rgb = lerp(water.albedo.rgb, _IntersectionColor.rgb, noise); + water.albedo.rgb = lerp(water.albedo.rgb, _IntersectionColor.rgb, noise); water.alpha = saturate(water.alpha + interSecGradient);