您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
46 行
1.4 KiB
46 行
1.4 KiB
namespace UnityEngine.MaterialGraph
|
|
{
|
|
public interface IRequiresTime
|
|
{
|
|
}
|
|
|
|
public enum GenerationMode
|
|
{
|
|
Preview2D,
|
|
Preview3D,
|
|
SurfaceShader
|
|
}
|
|
|
|
public static class GenerationModeExtensions
|
|
{
|
|
public static bool IsPreview(this GenerationMode mode) { return mode == GenerationMode.Preview2D || mode == GenerationMode.Preview3D; }
|
|
public static bool Is2DPreview(this GenerationMode mode) { return mode == GenerationMode.Preview2D; }
|
|
public static bool Is3DPreview(this GenerationMode mode) { return mode == GenerationMode.Preview3D; }
|
|
}
|
|
|
|
public interface IGeneratesBodyCode
|
|
{
|
|
void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode);
|
|
}
|
|
|
|
public interface IGeneratesVertexToFragmentBlock
|
|
{
|
|
void GenerateVertexToFragmentBlock(ShaderGenerator visitor, GenerationMode generationMode);
|
|
}
|
|
|
|
public interface IGeneratesFunction
|
|
{
|
|
void GenerateNodeFunction(ShaderGenerator visitor, GenerationMode generationMode);
|
|
}
|
|
|
|
public interface IGeneratesVertexShaderBlock
|
|
{
|
|
void GenerateVertexShaderBlock(ShaderGenerator visitor, GenerationMode generationMode);
|
|
}
|
|
|
|
public interface IGenerateProperties
|
|
{
|
|
void GeneratePropertyBlock(PropertyGenerator visitor, GenerationMode generationMode);
|
|
void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode);
|
|
}
|
|
}
|