还原水插件

This commit is contained in:
2026-03-05 00:14:42 +08:00
parent 0de35591e7
commit e82f2ea6b7
270 changed files with 2773 additions and 12445 deletions

View File

@@ -11,6 +11,8 @@
#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
@@ -43,7 +45,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) * g_Crest_HorizonNormal;
const float2 offset = -((float2)mask) * _Crest_HorizonNormal;
float weight = 1.0;
// Sample three pixels along the normal. If the sample is different than the

View File

@@ -13,7 +13,6 @@
#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"
@@ -41,8 +40,6 @@ int _Crest_DataSliceOffset;
half _Crest_Radius;
half _Crest_RefractionStrength;
bool _Crest_PortalInverted;
m_CrestNameSpace
struct Attributes
@@ -90,7 +87,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) == _Crest_PortalInverted)
if (LOAD_TEXTURE2D_X(_Crest_WaterMaskTexture, input.positionCS.xy).r == k_Crest_MaskInsidePortal)
{
discard;
}