升级水插件
This commit is contained in:
@@ -245,6 +245,14 @@ namespace WaveHarmonic.Crest
|
||||
/// Requires a two component texture format.
|
||||
/// </remarks>
|
||||
public bool EnableSignedDistanceFields { get => _EnableSignedDistanceFields; set => SetEnableSignedDistanceFields(_EnableSignedDistanceFields, _EnableSignedDistanceFields = value); }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to include the terrain height automatically.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will not include terrain details, nor will it produce a signed-distance field. There may also be a slight deviation due to differences in height data and terrain mesh. In these cases, please use the DepthProbe.
|
||||
/// </remarks>
|
||||
public bool IncludeTerrainHeight { get => _IncludeTerrainHeight; set => _IncludeTerrainHeight = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,6 +748,27 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
partial class Meniscus
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the meniscus is enabled.
|
||||
/// </summary>
|
||||
public bool Enabled { get => GetEnabled(); set => SetEnabled(_Enabled, _Enabled = value); }
|
||||
|
||||
/// <summary>
|
||||
/// Any camera with this layer in its culling mask will render the meniscus.
|
||||
/// </summary>
|
||||
public int Layer { get => _Layer; set => _Layer = value; }
|
||||
|
||||
/// <summary>
|
||||
/// The meniscus material.
|
||||
/// </summary>
|
||||
public UnityEngine.Material Material { get => _Material; set => SetMaterial(_Material, _Material = value); }
|
||||
}
|
||||
}
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
partial class PersistentLod
|
||||
@@ -1013,6 +1042,14 @@ namespace WaveHarmonic.Crest
|
||||
/// </remarks>
|
||||
public float MaximumVerticalDisplacement { get => _MaximumVerticalDisplacement; set => _MaximumVerticalDisplacement = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to use the wind turbulence on this component rather than the global wind turbulence.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Global wind turbulence comes from the Water Renderer component.
|
||||
/// </remarks>
|
||||
public bool OverrideGlobalWindTurbulence { get => _OverrideGlobalWindTurbulence; set => _OverrideGlobalWindTurbulence = value; }
|
||||
|
||||
/// <summary>
|
||||
/// FFT waves will loop with a period of this many seconds.
|
||||
/// </summary>
|
||||
@@ -1026,7 +1063,7 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// How turbulent/chaotic the waves are.
|
||||
/// </summary>
|
||||
public float WindTurbulence { get => _WindTurbulence; set => _WindTurbulence = value; }
|
||||
public float WindTurbulence { get => GetWindTurbulence(); set => _WindTurbulence = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1039,6 +1076,11 @@ namespace WaveHarmonic.Crest
|
||||
/// </summary>
|
||||
public int ComponentsPerOctave { get => _ComponentsPerOctave; set => _ComponentsPerOctave = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Prevent data arrays from being written to so one can provide their own.
|
||||
/// </summary>
|
||||
public bool ManualGeneration { get => _ManualGeneration; set => _ManualGeneration = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Change to get a different set of waves.
|
||||
/// </summary>
|
||||
@@ -1050,7 +1092,15 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// Each Gerstner wave is actually a pair of waves travelling in opposite directions (similar to FFT). This weight is applied to the wave travelling in against-wind direction. Set to zero to obtain simple single waves which are useful for shorelines waves.
|
||||
/// </remarks>
|
||||
public float ReverseWaveWeight { get => _ReverseWaveWeight; set => _ReverseWaveWeight = value; }
|
||||
public float ReverseWaveWeight { get => GetReverseWaveWeight(); set => _ReverseWaveWeight = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Use a swell spectrum as the default.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Uses a swell spectrum as default (when none is assigned), and disabled reverse waves.
|
||||
/// </remarks>
|
||||
public bool Swell { get => _Swell; set => _Swell = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1066,6 +1116,14 @@ namespace WaveHarmonic.Crest
|
||||
/// </remarks>
|
||||
public bool EvaluateSpectrumAtRunTimeEveryFrame { get => _EvaluateSpectrumAtRunTimeEveryFrame; set => _EvaluateSpectrumAtRunTimeEveryFrame = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to use the wind direction on this component rather than the global wind direction.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Global wind direction comes from the Water Renderer component.
|
||||
/// </remarks>
|
||||
public bool OverrideGlobalWindDirection { get => _OverrideGlobalWindDirection; set => _OverrideGlobalWindDirection = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to use the wind speed on this component rather than the global wind speed.
|
||||
/// </summary>
|
||||
@@ -1101,7 +1159,7 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// This is the angle from x axis in degrees that the waves are oriented towards. If a spline is being used to place the waves, this angle is relative to the spline.
|
||||
/// </remarks>
|
||||
public float WaveDirectionHeadingAngle { get => _WaveDirectionHeadingAngle; set => _WaveDirectionHeadingAngle = value; }
|
||||
public float WaveDirectionHeadingAngle { get => GetWaveDirectionHeadingAngle(); set => _WaveDirectionHeadingAngle = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Wind speed in km/h. Controls wave conditions.
|
||||
@@ -1203,10 +1261,79 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
partial class SurfaceRenderer
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether to allow sorting using the render queue.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If you need to change the minor part of the render queue (eg +100), then enable this option. As a side effect, it will also disable the front-to-back rendering optimization for Crest. This option does not affect changing the major part of the render queue (eg AlphaTest, Transparent), as that is always allowed.
|
||||
/// </remarks>
|
||||
public bool AllowRenderQueueSorting { get => _AllowRenderQueueSorting; set => _AllowRenderQueueSorting = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Have the water surface cast shadows for albedo (both foam and custom).
|
||||
/// </summary>
|
||||
public bool CastShadows { get => GetCastShadows(); set => _CastShadows = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the underwater effect is enabled.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Allocates/releases resources if state has changed.
|
||||
/// </remarks>
|
||||
public bool Enabled { get => GetEnabled(); set => SetEnabled(_Enabled, _Enabled = value); }
|
||||
|
||||
/// <summary>
|
||||
/// The water chunk renderers will have this layer.
|
||||
/// </summary>
|
||||
public int Layer { get => _Layer; set => _Layer = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Material to use for the water surface.
|
||||
/// </summary>
|
||||
public UnityEngine.Material Material { get => _Material; set => _Material = value; }
|
||||
|
||||
/// <summary>
|
||||
/// How many frames to distribute the chunk bounds calculation.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The chunk bounds are calculated per frame to ensure culling is correct when using inputs that affect displacement. Some performance can be saved by distributing the load over several frames. The higher the frames, the longer it will take - lowest being instant.
|
||||
/// </remarks>
|
||||
public int TimeSliceBoundsUpdateFrameCount { get => _TimeSliceBoundsUpdateFrameCount; set => _TimeSliceBoundsUpdateFrameCount = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Underwater will copy from this material if set.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Useful for overriding properties for the underwater effect. To see what properties can be overriden, see the disabled properties on the underwater material. This does not affect the surface.
|
||||
/// </remarks>
|
||||
public UnityEngine.Material VolumeMaterial { get => _VolumeMaterial; set => _VolumeMaterial = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether 'Water Body' components will cull the water tiles.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Disable if you want to use the 'Material Override' feature and still have an ocean.
|
||||
/// </remarks>
|
||||
public bool WaterBodyCulling { get => _WaterBodyCulling; set => _WaterBodyCulling = value; }
|
||||
}
|
||||
}
|
||||
|
||||
namespace WaveHarmonic.Crest
|
||||
{
|
||||
partial class TextureLodInputData
|
||||
{
|
||||
/// <summary>
|
||||
/// Multiplies the texture sample.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is useful for normalized textures. The four components map to the four color/alpha components of the texture (if they exist).
|
||||
/// </remarks>
|
||||
public UnityEngine.Vector4 Multiplier { get => _Multiplier; set => _Multiplier = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Texture to render into the simulation.
|
||||
/// </summary>
|
||||
@@ -1506,7 +1633,8 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// If you need to change the minor part of the render queue (eg +100), then enable this option. As a side effect, it will also disable the front-to-back rendering optimization for Crest. This option does not affect changing the major part of the render queue (eg AlphaTest, Transparent), as that is always allowed.
|
||||
/// </remarks>
|
||||
public bool AllowRenderQueueSorting { get => _AllowRenderQueueSorting; set => _AllowRenderQueueSorting = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public bool AllowRenderQueueSorting { get => GetAllowRenderQueueSorting(); set => SetAllowRenderQueueSorting(_AllowRenderQueueSorting, _AllowRenderQueueSorting = value); }
|
||||
|
||||
/// <summary>
|
||||
/// All waves (including Dynamic Waves) are written to this simulation.
|
||||
@@ -1524,7 +1652,16 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// Have the water surface cast shadows for albedo (both foam and custom).
|
||||
/// </summary>
|
||||
public bool CastShadows { get => GetCastShadows(); set => _CastShadows = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public bool CastShadows { get => GetCastShadows(); set => SetCastShadows(_CastShadows, _CastShadows = value); }
|
||||
|
||||
/// <summary>
|
||||
/// Keep the center of detail from drifting from the viewpoint.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Large horizontal displacement can displace the center of detail. This uses queries to keep the center of detail aligned.
|
||||
/// </remarks>
|
||||
public bool CenterOfDetailDisplacementCorrection { get => _CenterOfDetailDisplacementCorrection; set => _CenterOfDetailDisplacementCorrection = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Clip surface information for clipping the water surface.
|
||||
@@ -1593,10 +1730,19 @@ namespace WaveHarmonic.Crest
|
||||
/// </summary>
|
||||
public float GravityOverride { get => _GravityOverride; set => _GravityOverride = value; }
|
||||
|
||||
/// <summary>
|
||||
/// When in the render pipeline the water is rendered.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Default is the old behaviour which is controlled by Unity.
|
||||
/// </remarks>
|
||||
public WaterInjectionPoint InjectionPoint { get => _InjectionPoint; set => _InjectionPoint = value; }
|
||||
|
||||
/// <summary>
|
||||
/// The water chunk renderers will have this layer.
|
||||
/// </summary>
|
||||
public int Layer { get => _Layer; set => _Layer = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public int Layer { get => GetLayer(); set => SetLayer(_Layer, _Layer = value); }
|
||||
|
||||
/// <summary>
|
||||
/// Varying water level to support water bodies at different heights and rivers to run down slopes.
|
||||
@@ -1606,7 +1752,13 @@ namespace WaveHarmonic.Crest
|
||||
/// <summary>
|
||||
/// Material to use for the water surface.
|
||||
/// </summary>
|
||||
public UnityEngine.Material Material { get => _Material; set => _Material = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public UnityEngine.Material Material { get => GetMaterial(); set => SetMaterial(_Material, _Material = value); }
|
||||
|
||||
/// <summary>
|
||||
/// The meniscus module.
|
||||
/// </summary>
|
||||
public Meniscus Meniscus => _Meniscus;
|
||||
|
||||
/// <summary>
|
||||
/// Provide your own gravity value instead of Physics.gravity.
|
||||
@@ -1689,6 +1841,11 @@ namespace WaveHarmonic.Crest
|
||||
/// </remarks>
|
||||
public int LodLevels { get => _Slices; set => _Slices = value; }
|
||||
|
||||
/// <summary>
|
||||
/// The water surface renderer.
|
||||
/// </summary>
|
||||
public SurfaceRenderer Surface => _Surface;
|
||||
|
||||
/// <summary>
|
||||
/// The distance threshold for when the viewer has considered to have teleported.
|
||||
/// </summary>
|
||||
@@ -1703,7 +1860,8 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// The chunk bounds are calculated per frame to ensure culling is correct when using inputs that affect displacement. Some performance can be saved by distributing the load over several frames. The higher the frames, the longer it will take - lowest being instant.
|
||||
/// </remarks>
|
||||
public int TimeSliceBoundsUpdateFrameCount { get => _TimeSliceBoundsUpdateFrameCount; set => _TimeSliceBoundsUpdateFrameCount = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public int TimeSliceBoundsUpdateFrameCount { get => GetTimeSliceBoundsUpdateFrameCount(); set => SetTimeSliceBoundsUpdateFrameCount(_TimeSliceBoundsUpdateFrameCount, _TimeSliceBoundsUpdateFrameCount = value); }
|
||||
|
||||
/// <summary>
|
||||
/// The underwater renderer.
|
||||
@@ -1724,7 +1882,8 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// Useful for overriding properties for the underwater effect. To see what properties can be overriden, see the disabled properties on the underwater material. This does not affect the surface.
|
||||
/// </remarks>
|
||||
public UnityEngine.Material VolumeMaterial { get => _VolumeMaterial; set => _VolumeMaterial = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public UnityEngine.Material VolumeMaterial { get => GetVolumeMaterial(); set => SetVolumeMaterial(_VolumeMaterial, _VolumeMaterial = value); }
|
||||
|
||||
/// <summary>
|
||||
/// Whether 'Water Body' components will cull the water tiles.
|
||||
@@ -1732,7 +1891,16 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// Disable if you want to use the 'Material Override' feature and still have an ocean.
|
||||
/// </remarks>
|
||||
public bool WaterBodyCulling { get => _WaterBodyCulling; set => _WaterBodyCulling = value; }
|
||||
[System.Obsolete("This property can now be found on WaterRenderer.Surface")]
|
||||
public bool WaterBodyCulling { get => GetWaterBodyCulling(); set => SetWaterBodyCulling(_WaterBodyCulling, _WaterBodyCulling = value); }
|
||||
|
||||
/// <summary>
|
||||
/// Base wind direction in degrees.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Controls wave conditions. Can be overridden on Shape* components.
|
||||
/// </remarks>
|
||||
public float WindDirection { get => GetWindDirection(); set => _WindDirection = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Base wind speed in km/h.
|
||||
@@ -1740,7 +1908,23 @@ namespace WaveHarmonic.Crest
|
||||
/// <remarks>
|
||||
/// Controls wave conditions. Can be overridden on Shape* components.
|
||||
/// </remarks>
|
||||
public float WindSpeed { get => _WindSpeed; set => _WindSpeed = value; }
|
||||
public float WindSpeed { get => GetWindSpeed(); set => _WindSpeed = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Base wind turbulence.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Controls wave conditions. Can be overridden on ShapeFFT components.
|
||||
/// </remarks>
|
||||
public float WindTurbulence { get => GetWindTurbulence(); set => _WindTurbulence = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Uses a provided WindZone as the source of global wind.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// It must be directional. Wind speed units are presumed to be in m/s.
|
||||
/// </remarks>
|
||||
public UnityEngine.WindZone WindZone { get => _WindZone; set => _WindZone = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to enable motion vector support.
|
||||
@@ -1748,12 +1932,20 @@ namespace WaveHarmonic.Crest
|
||||
public bool WriteMotionVectors { get => GetWriteMotionVectors(); set => _WriteMotionVectors = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to write the water surface depth to the depth texture (URP only).
|
||||
/// Whether to write the water surface color to the color/opaque texture.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The water surface writes to the depth buffer, but Unity does not copy it to the depth texture for post-processing effects like Depth of Field. This will copy the depth buffer to the depth texture.
|
||||
/// This is likely only beneficial if the water injection point is before transparency, and there are shaders which need it (like refraction).
|
||||
/// </remarks>
|
||||
public bool WriteToDepthTexture { get => _WriteToDepthTexture; set => _WriteToDepthTexture = value; }
|
||||
public bool WriteToColorTexture { get => GetWriteToColorTexture(); set => _WriteToColorTexture = value; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to write the water surface depth to the depth texture.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The water surface writes to the depth buffer, but Unity does not copy it to the depth texture for post-processing effects like Depth of Field (or refraction). This will copy the depth buffer to the depth texture.
|
||||
/// </remarks>
|
||||
public bool WriteToDepthTexture { get => GetWriteToDepthTexture(); set => _WriteToDepthTexture = value; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user