Class FilterContext
Provides information for generating images based on Terrain texture data ie. procedural brush masks.
Namespace: UnityEditor.TerrainTools
Syntax
public class FilterContext : IDisposable
Constructors
FilterContext(GraphicsFormat, Vector3, Single, Single)
Initializes and returns an instance of FiterContext.
Declaration
public FilterContext(GraphicsFormat targetFormat, Vector3 brushPos, float brushSize, float brushRotation)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Experimental.Rendering.GraphicsFormat | targetFormat | The target GraphicsFormat that will be used for Filter evaluation. |
UnityEngine.Vector3 | brushPos | The brush position. |
Single | brushSize | The brush size. |
Single | brushRotation | The brush rotation. |
Properties
brushPos
Gets and sets the position of the brush in world space coordinates.
Declaration
public Vector3 brushPos { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
brushRotation
Gets and sets the rotation of the brush in degrees.
Declaration
public float brushRotation { get; }
Property Value
Type | Description |
---|---|
Single |
brushSize
Gets and sets the size of the brush in world space units.
Declaration
public float brushSize { get; }
Property Value
Type | Description |
---|---|
Single |
floatProperties
Gets and sets a collection of common floating-point values that are used during Filter composition.
Declaration
public Dictionary<string, float> floatProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<String, Single> |
intProperties
Gets and sets a collection of common integer values that are used during Filter composition.
Declaration
public Dictionary<string, int> intProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<String, Int32> |
rtHandleCollection
Gets and sets a collection of common RenderTextures that are used during Filter composition.
Declaration
public RTHandleCollection rtHandleCollection { get; }
Property Value
Type | Description |
---|---|
RTHandleCollection |
targetFormat
Gets and sets a GraphicsFormat that is used for the destination RenderTextures when a FilterStack is evaluated. This is used for some validation without the need for actual RenderTextures.
Declaration
public GraphicsFormat targetFormat { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Experimental.Rendering.GraphicsFormat |
vectorProperties
Gets and sets a collection of common vector values that are used during Filter composition.
Declaration
public Dictionary<string, Vector4> vectorProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<String, UnityEngine.Vector4> |
Methods
Dispose()
Disposes render textures within the handle collection.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes render textures within the handle collection.
Declaration
public virtual void Dispose(bool dispose)
Parameters
Type | Name | Description |
---|---|---|
Boolean | dispose | Whether or not resources should be disposed. |
Remarks
Override this method if you create a class that derives from FilterContext.
ReleaseRTHandles()
Releases gathered RenderTexture resources.
Declaration
public void ReleaseRTHandles()