Version: 2020.2
言語: 日本語
Experimental: this API is experimental and might be changed or removed in the future.

TerrainPaintUtilityEditor.DrawBrushPreview

マニュアルに切り替える
public static void DrawBrushPreview (Experimental.TerrainAPI.PaintContext heightmapPC, Experimental.TerrainAPI.TerrainPaintUtilityEditor.BrushPreview previewTexture, Texture brushTexture, Experimental.TerrainAPI.BrushTransform brushXform, Material proceduralMaterial, int materialPassIndex);

パラメーター

heightmapPC PaintContext describing the heightmap from which to build the preview mesh.
previewTexture Specifies Whether to build the mesh using the source or destination render texture in heightmapPC.
brushTexture The brush texture to preview.
brushXform Describes the position and orientation of the brush.
proceduralMaterial Material used to render the preview.
materialPassIndex Material pass to render.

説明

Draws a Terrain brush preview mesh from a heightmap PaintContext using the provided procedural material.

The heightmapPC is used to build the mesh. To ensure that the preview is rendered on the mesh, the heightmapPC must contain an area around the brush. To facilitate proper transformation of brush UV space, this method sets up the brush transforms in the material. Important: The material provided must support procedural mesh generation in the vertex shader using the shader functions provided in TerrainPreview.cginc. A default implementation of the material is provided by GetDefaultBrushPreviewMaterial().

See Also: TerrainPaintUtilityEditor.GetDefaultBrushPreviewMaterial and PaintContext.