升级水插件

This commit is contained in:
2026-01-08 22:30:55 +08:00
parent febff82d24
commit ca68084264
415 changed files with 18138 additions and 7134 deletions

View File

@@ -100,7 +100,8 @@ half2 Fragment(Varyings input)
float4 positionWS = float4(input.positionWS.xyz, 1.0);
// Shadow from last frame. Manually implement black border.
half2 shadow = Cascade::MakeShadowSource(_Crest_LodIndex + g_Crest_LodChange).SampleShadowOverflow(positionWS.xz, 1.0);
const float sliceIndexSource = clamp((int)_Crest_LodIndex + g_Crest_LodChange, 0.0, g_Crest_LodCount - 1.0);
half2 shadow = Cascade::MakeShadowSource(sliceIndexSource).SampleShadowOverflow(positionWS.xz, 1.0);
// Add displacement so shorelines do not receive shadows incorrectly.
positionWS.xyz += Cascade::MakeAnimatedWaves(_Crest_LodIndex).SampleDisplacement(positionWS.xz);