升级6.4.升级水,升级天气
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
@@ -102,6 +104,10 @@ namespace WaveHarmonic.Crest
|
||||
None,
|
||||
Zero = 1 << 0,
|
||||
Color = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// Depth is used for the legacy mask or for stencil operations.
|
||||
/// </summary>
|
||||
Depth = 1 << 2,
|
||||
Both = Color | Depth,
|
||||
}
|
||||
@@ -235,7 +241,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 +257,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 +283,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 +294,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user