升级水插件

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

@@ -85,7 +85,10 @@ 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)
@@ -96,6 +99,7 @@ namespace WaveHarmonic.Crest
context.ExecuteCommandBuffer(buffer);
CommandBufferPool.Release(buffer);
}
#endif
}
}
}

View File

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