我们创建了 Fontainebleau 演示来说明摄影photogrammetry流程和 LayeredLit 着色器的使用。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

57 行
1.6 KiB

using UnityEngine;
using System.Collections;
// base class for custom brushes, see VertexPainterNoiseBrush for an example of how to use..
namespace JBooth.VertexPainterPro
{
public class VertexPainterCustomBrush : ScriptableObject
{
#if UNITY_EDITOR
public enum Channels
{
Colors = 1,
UV0 = 2,
UV1 = 4,
UV2 = 8,
UV3 = 16,
Normals = 32,
Positions = 64
}
// preview color for the brush
public virtual Color GetPreviewColor()
{
return Color.yellow;
}
// return a bitmask of channels in use, so Channels.Colors | Channels.UV0 if you affect those channels with your brush..
public virtual Channels GetChannels()
{
Debug.LogError("GetChannels not implimented in custom brush!");
return 0;
}
// return a delegate to modify the vert by lerping it towards a given value
public virtual VertexPainterWindow.Lerper GetLerper()
{
Debug.LogError("Lerper not implimented in custom brush!");
return null;
}
public virtual object GetBrushObject()
{
Debug.LogError("GetBrushObject not implimented in custom brush");
return null;
}
// called before we start applying stroke data for a given frame via brush
// not necissarily called by utilities..
public virtual void BeginApplyStroke(Ray ray)
{
}
// function in case you'd like to draw some custom gui for your brush
public virtual void DrawGUI()
{
}
#endif
}
}