Class WaterFoamGenerator
Procedural water foam generator component.
Implements
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
[DisallowMultipleComponent]
[ExecuteInEditMode]
public class WaterFoamGenerator : MonoBehaviour, IVersionable<WaterFoamGenerator.Version>
Fields
deepFoamDimmer
Specifies a dimmer for the deep foam.
Declaration
[Range(0, 1)]
public float deepFoamDimmer
Field Value
Type | Description |
---|---|
float |
material
Specifies the material used for the foam.
Declaration
[Tooltip("Specifies the material used for the generator.")]
public Material material
Field Value
Type | Description |
---|---|
Material |
regionSize
Specifies the size of the generator in meters.
Declaration
public Vector2 regionSize
Field Value
Type | Description |
---|---|
Vector2 |
resolution
Specifies the resolution when written inside the atlas.
Declaration
public Vector2Int resolution
Field Value
Type | Description |
---|---|
Vector2Int |
scaleMode
The scaling mode to apply to this Foam Generator.
Declaration
[Tooltip("Specify the scaling mode")]
public DecalScaleMode scaleMode
Field Value
Type | Description |
---|---|
DecalScaleMode |
surfaceFoamDimmer
Specifies the dimmer for the surface foam.
Declaration
[Range(0, 1)]
public float surfaceFoamDimmer
Field Value
Type | Description |
---|---|
float |
texture
Specifies the texture used for the foam.
Declaration
public Texture texture
Field Value
Type | Description |
---|---|
Texture |
type
Specifies the type of the generator. This parameter defines which parameters will be used to render it.
Declaration
public WaterFoamGeneratorType type
Field Value
Type | Description |
---|---|
WaterFoamGeneratorType |
updateMode
Frequency of update of the Material in the atlas.
Declaration
[Tooltip("Frequency of update of the Material in the atlas.")]
public CustomRenderTextureUpdateMode updateMode
Field Value
Type | Description |
---|---|
CustomRenderTextureUpdateMode |
Methods
HasPropertyBlock()
Returns true if the Foam Generator has a material property block attached via SetPropertyBlock.
Declaration
public bool HasPropertyBlock()
Returns
Type | Description |
---|---|
bool | Returns true if the Foam Generator has a material property block attached via SetPropertyBlock. |
RequestUpdate()
Triggers a render of the material in the deformer atlas.
Declaration
public void RequestUpdate()
SetPropertyBlock(MaterialPropertyBlock)
Override per-generator material parameters. This is more memory efficient than having one complete distinct Material per generator but is recommended when only a few properties of a Material overriden.
Declaration
public void SetPropertyBlock(MaterialPropertyBlock properties)
Parameters
Type | Name | Description |
---|---|---|
MaterialPropertyBlock | properties | Property block with values you want to override. |