Class FilterContext
Provides information for generating images based on Terrain texture data ie. procedural brush masks.
Implements
Inherited Members
Namespace: UnityEditor.TerrainTools
Assembly: Unity.TerrainTools.Editor.dll
Syntax
public class FilterContext : IDisposable
  Constructors
FilterContext(GraphicsFormat, Vector3, float, float)
Initializes and returns an instance of FiterContext.
Declaration
public FilterContext(GraphicsFormat targetFormat, Vector3 brushPos, float brushSize, float brushRotation)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GraphicsFormat | targetFormat | The target GraphicsFormat that will be used for Filter evaluation.  | 
      
| Vector3 | brushPos | The brush position.  | 
      
| float | brushSize | The brush size.  | 
      
| float | 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 | 
|---|---|
| Vector3 | 
brushRotation
Gets and sets the rotation of the brush in degrees.
Declaration
public float brushRotation { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
brushSize
Gets and sets the size of the brush in world space units.
Declaration
public float brushSize { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
diffuseTextures
Gets and sets terrain layer diffuse textures
Declaration
public TerrainLayer[] diffuseTextures { get; }
  Property Value
| Type | Description | 
|---|---|
| TerrainLayer[] | 
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, float> | 
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, int> | 
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 | 
|---|---|
| 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, Vector4> | 
Methods
Dispose()
Disposes render textures within the handle collection.
Declaration
public void Dispose()
  Dispose(bool)
Disposes render textures within the handle collection.
Declaration
public virtual void Dispose(bool dispose)
  Parameters
| Type | Name | Description | 
|---|---|---|
| bool | 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()