还原水插件

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

@@ -85,10 +85,7 @@ namespace WaveHarmonic.Crest
});
}
}
#endif
#if URP_COMPATIBILITY_MODE
#if UNITY_6000_0_OR_NEWER
[System.Obsolete]
#endif
public override void Execute(ScriptableRenderContext context, ref RenderingData data)
@@ -99,7 +96,6 @@ namespace WaveHarmonic.Crest
context.ExecuteCommandBuffer(buffer);
CommandBufferPool.Release(buffer);
}
#endif
}
}
}

View File

@@ -21,7 +21,6 @@ namespace WaveHarmonic.Crest
public static MaskRenderer Instantiate(WaterRenderer water)
{
#pragma warning disable format
#if d_UnityHDRP
if (RenderPipelineHelper.IsHighDefinition)
{
@@ -41,7 +40,6 @@ namespace WaveHarmonic.Crest
{
return new MaskRendererBIRP(water);
}
#pragma warning restore format
}
// For PortalRenderer.
@@ -237,7 +235,7 @@ namespace WaveHarmonic.Crest
slices: TextureXR.slices,
dimension: TextureXR.dimension,
depthBufferBits: DepthBits.None,
colorFormat: Helpers.GetCompatibleTextureFormat(GraphicsFormat.R16_SFloat, randomWrite: true),
colorFormat: GraphicsFormat.R16_SFloat,
enableRandomWrite: true,
useDynamicScale: true,
name: k_MaskColor
@@ -253,7 +251,7 @@ namespace WaveHarmonic.Crest
scaleFactor: Vector2.one,
slices: TextureXR.slices,
dimension: TextureXR.dimension,
depthBufferBits: Rendering.GetDefaultDepthBufferBits(),
depthBufferBits: Helpers.k_DepthBits,
colorFormat: GraphicsFormat.None,
enableRandomWrite: false,
useDynamicScale: true,
@@ -279,7 +277,7 @@ namespace WaveHarmonic.Crest
if (_Inputs.HasFlag(MaskInput.Depth))
{
descriptor.graphicsFormat = GraphicsFormat.None;
descriptor.depthBufferBits = (int)Rendering.GetDefaultDepthBufferBits();
descriptor.depthBufferBits = Helpers.k_DepthBufferBits;
if (RenderPipelineCompatibilityHelper.ReAllocateIfNeeded(ref _DepthRTH, descriptor, name: k_MaskDepth))
{
@@ -290,8 +288,7 @@ namespace WaveHarmonic.Crest
if (_Inputs.HasFlag(MaskInput.Color))
{
// NOTE: Intel iGPU for Metal and DirectX both had issues with R16 (2021.11.18).
descriptor.graphicsFormat = Helpers.GetCompatibleTextureFormat(GraphicsFormat.R16_SFloat, randomWrite: true);
descriptor.depthStencilFormat = GraphicsFormat.None;
descriptor.graphicsFormat = GraphicsFormat.R16_SFloat;
descriptor.depthBufferBits = 0;
descriptor.enableRandomWrite = true;