升级水插件

This commit is contained in:
2026-01-31 00:32:49 +08:00
parent a739d2fe3b
commit 4123e83573
293 changed files with 13449 additions and 2853 deletions

View File

@@ -11,8 +11,6 @@
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl"
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl"
float2 _Crest_HorizonNormal;
TEXTURE2D_X(_Crest_WaterMaskTexture);
m_CrestNameSpace
@@ -45,7 +43,7 @@ half4 Fragment(Varyings input)
const uint2 positionSS = input.positionCS.xy;
const float mask = LOAD_TEXTURE2D_X(_Crest_WaterMaskTexture, positionSS).x;
const float2 offset = -((float2)mask) * _Crest_HorizonNormal;
const float2 offset = -((float2)mask) * g_Crest_HorizonNormal;
float weight = 1.0;
// Sample three pixels along the normal. If the sample is different than the

View File

@@ -13,6 +13,7 @@
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl"
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl"
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Keywords.hlsl"
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl"
#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl"
@@ -40,6 +41,8 @@ int _Crest_DataSliceOffset;
half _Crest_Radius;
half _Crest_RefractionStrength;
bool _Crest_PortalInverted;
m_CrestNameSpace
struct Attributes
@@ -87,7 +90,7 @@ half4 Fragment(Varyings input)
#if d_Masked
// Prevent rendering inside of new portal modules.
if (LOAD_TEXTURE2D_X(_Crest_WaterMaskTexture, input.positionCS.xy).r == k_Crest_MaskInsidePortal)
if ((LOAD_TEXTURE2D_X(_Crest_WaterMaskTexture, input.positionCS.xy).r == k_Crest_MaskInsidePortal) == _Crest_PortalInverted)
{
discard;
}