docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class WaterSurface

    Water surface component.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    WaterSurface
    Implements
    IVersionable<WaterSurface.Version>
    ISerializationCallbackReceiver
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    [DisallowMultipleComponent]
    [ExecuteInEditMode]
    public class WaterSurface : MonoBehaviour, IVersionable<WaterSurface.Version>, ISerializationCallbackReceiver

    Fields

    Name Description
    absorptionDistance

    Controls the approximative distance in meters that the camera can perceive through a water surface. This distance can vary widely depending on the intensity of the light the object receives.

    absorptionDistanceMultiplier

    Sets the multiplier for the Absorption Distance when the camera is underwater. A value of 2.0 means you will see twice as far underwater.

    ambientScattering

    Controls the intensity of the ambient scattering term. This can be adjusted for artistic purposes.

    caustics

    When enabled, the water surface will render caustics.

    causticsBand

    Controls which band is used for the caustics evaluation.

    causticsDirectionalShadow

    When enabled, the water caustics will take into account the directional light's shadow.

    causticsDirectionalShadowDimmer

    Sets the water caustics dimmer value for the directional shadow.

    causticsIntensity

    Sets the intensity of the under-water caustics.

    causticsPlaneBlendDistance

    Sets the vertical blending distance for the water caustics.

    causticsResolution

    Specifies the resolution at which the water caustics are rendered (simulation only).

    causticsTilingFactor

    Sets a tiling factor for the water caustics.

    colorPyramidOffset

    Sets the offset used to evaluated the underwater refraction. Higher values produce blurrier results but introduce aliasing artifacts.

    cpuEvaluateRipples

    Specifies if the CPU simulation should evaluate the ripples as part of the simulation. Including ripples will allow a higher visual fidelity but the cost of the simulation will increase.

    cpuFullResolution

    Specifies if the CPU simulation should be evaluated at full or half resolution. When in full resolution, the visual fidelity will be higher but the cost of the simulation will increase.

    cpuSimulation

    When enabled, HDRP will evaluate the water simulation on the CPU for C# script requests. Enabling this will significantly increase the CPU cost of the feature.

    currentDebugMultiplier

    Sets a multiplier for the arrow density in the current debug mode.

    customMaterial

    Sets a custom material that will be used to render the water surface. If set to None a default material is used.

    debugMode

    Sets the debug mode for a given water surface.

    decalLayerMask

    Specifies the decal layers that affect the water surface.

    deformation

    Specifies if the water surfaces supports local deformations.

    deformationAreaOffset

    Specified the offset of the deformation area in meters.

    deformationAreaSize

    Specified the size of the deformation area in meters.

    deformationRes

    Specifies the resolution of the deformation texture used to represent the deformation area.

    directLightBodyScattering

    Controls the intensity of the direct light scattering on the body of the waves. The effect is more perceivable at grazing angles.

    directLightTipScattering

    Controls the intensity of the direct light scattering on the tip of the waves. The effect is more perceivable at grazing angles.

    displacementScattering

    Controls the intensity of the displacement based scattering. The bigger horizontal displacement, the more the water receives scattering. This can be adjusted for artistic purposes.

    endSmoothness
    foam

    Specifies if the water surfaces support foam rendering.

    foamAreaOffset

    Specifies the offset of the foam area in meters.

    foamAreaSize

    Specifies the size of the foam area in meters.

    foamColor

    Set the foam color.

    foamPersistenceMultiplier

    Specifies the foam persistence multiplier. A higher value will lead to the foam remaining visible longer.

    foamResolution

    Specifies the resolution of the foam texture.

    foamSmoothness

    Controls the surface foam smoothness.

    foamTextureTiling

    Set the per meter tiling for the foam texture.

    geometryType

    Specifies the type of geometry used to render the water surface.

    heightScattering

    Controls the intensity of the height based scattering. The higher the vertical displacement, the more the water receives scattering. This can be adjusted for artistic purposes.

    largeBand0FadeDistance
    largeBand0FadeMode
    largeBand0FadeStart
    largeBand0FadeToggle
    largeBand0Multiplier
    largeBand1FadeDistance
    largeBand1FadeMode
    largeBand1FadeStart
    largeBand1FadeToggle
    largeBand1Multiplier
    largeChaos
    largeCurrentMap
    largeCurrentMapInfluence
    largeCurrentRegionExtent
    largeCurrentRegionOffset
    largeCurrentSpeedValue
    largeOrientationValue
    largeWindSpeed
    lightLayerMask

    Specifies the light layers that affect the water surface.

    maxRefractionDistance

    Controls the maximum distance in meters used to clamp the underwater refraction depth. Higher value increases the distortion amount.

    maximumHeightOverride

    Specifies a maximum wave height that overrides the simulation to support scattering properly for deformers.

    meshRenderers

    Sets the geometry to use when rendering in quad and custom geometry type mode. The vertical position of the vertices will be overridden to keep the surface of water leveled.

    refractionColor

    Sets the color that is used to simulate the under-water refraction.

    renderingLayerMask

    Specifies the rendering layers that affect the water surface.

    repetitionSize
    ripples

    When enabled, the water system allows you to simulate and render a ripples simulation for finer details.

    ripplesChaos
    ripplesCurrentMap
    ripplesCurrentMapInfluence
    ripplesCurrentRegionExtent
    ripplesCurrentRegionOffset
    ripplesCurrentSpeedValue
    ripplesFadeDistance
    ripplesFadeMode
    ripplesFadeStart
    ripplesFadeToggle
    ripplesMotionMode
    ripplesOrientationValue
    ripplesWindSpeed
    scatteringColor

    Sets the color that is used to simulate the water light scattering.

    simulationFoam

    When enabled, the water surface will receive foam from the simulation on the crest of the waves.

    simulationFoamAmount

    Controls the simulation foam amount. Higher values generate larger foam patches. Foam presence is highly dependent on the wind speed and choppiness values.

    simulationFoamMask

    Set the texture used to attenuate or suppress the simulation foam.

    simulationFoamMaskExtent

    Sets the extent of the foam mask in meters.

    simulationFoamMaskOffset

    Sets the offset of the foam mask in meters.

    simulationFoamWindCurve

    Controls the simulation foam amount depending on the wind speed.

    smoothnessFadeDistance
    smoothnessFadeStart
    startSmoothness
    surfaceType

    Specifies the nature of the water body that the water system needs to simulate.

    timeMultiplier

    Sets the speed of the water simulation. This allows to slow down the waves' speed or to accelerate it.

    underWater

    When enabled, HDRP will apply a fog and color shift to the final image when the camera is under the surface. This feature has a cost even when the camera is above the water surface.

    underWaterAmbientProbeContribution

    Sets the contribution of the ambient probe luminance when multiplied by the underwater scattering color.

    underWaterRefraction

    Determines if water surface should refract light when looking at objects from underwater. This simulates the correct behavior of water but may introduce visual artifacts as it relies on screen space refraction.

    underWaterScatteringColor

    Sets the color that is used to simulate the scattering when the camera is under-water.

    underWaterScatteringColorMode

    Sets how the underwater scattering color is specified.

    virtualPlaneDistance

    Sets the distance at which the simulated caustics are projected. High values generate sharper caustics but can cause artifacts.

    volumeBounds

    Sets a box collider that will be used to define the volume where the underwater effect is applied for non infinite surfaces.

    volumeDepth

    Sets maximum depth at which the underwater effect is evaluated for infinite surfaces.

    volumeHeight

    Sets the maximum height at which the underwater effect is evaluated for infinite surfaces. This allows to cover the underwater scenario when deformers are higher than waves or ripples.

    volumePrority

    Sets a priority value that is used to define which surface should be considered for underwater rendering in the case of multiple overlapping surfaces.

    waterCurrentDebugMode

    Sets the water current debug mode for a given water surface.

    waterFoamDebugMode

    Sets the water foam debug mode for a given water surface.

    waterMask

    Sets the texture used to attenuate or suppress the swell, agitation and ripples water frequencies.

    waterMaskDebugMode

    Sets the water mask debug mode for a given water surface.

    waterMaskExtent

    Sets the extent of the water mask in meters.

    waterMaskOffset

    Sets the offset of the water mask in meters.

    waterMaskRemap

    Sets the remapped range of the water mask.

    Properties

    Name Description
    simulationStart

    Used to sync different water surfaces simulation time, for example across network.

    Methods

    Name Description
    FillWaterSearchData(ref WaterSimSearchData)

    Function that fills a WaterSimSearchData with the data of the current water surface.

    GetCausticsBuffer(out float)

    Function that returns the caustics buffer for the water surface. If the feature is disabled or the resource is not available the function returns null.

    GetFoamBuffer(out Vector2)

    Function that returns the foam buffer for the water surface. If the feature is disabled or the resource is not available the function returns null.

    GetSimulationResolutionCPU()

    Function that returns the water surface CPU simulation resolution.

    ProjectPointOnWaterSurface(WaterSearchParameters, out WaterSearchResult)

    Function that attempts to evaluate the projection of a given world space position onto the water surface. This requires the HDRP asset and the water surface to have script interactions enabled.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)