您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
34 行
946 B
34 行
946 B
using System;
|
|
|
|
namespace UnityEngine.MaterialGraph
|
|
{
|
|
[Serializable]
|
|
public abstract class BaseLightFunction
|
|
{
|
|
public const string kNormalSlotName = "Normal";
|
|
public const int NormalSlotId = 1;
|
|
|
|
public abstract string lightFunctionName { get; }
|
|
|
|
public abstract string surfaceOutputStructureName { get; }
|
|
|
|
public virtual void GenerateLightFunctionBody(ShaderGenerator visitor) {}
|
|
|
|
public virtual void GenerateLightFunctionName(ShaderGenerator visitor)
|
|
{
|
|
visitor.AddPragmaChunk(lightFunctionName);
|
|
}
|
|
|
|
public virtual void GenerateSurfaceOutputStructureName(ShaderGenerator visitor)
|
|
{
|
|
visitor.AddPragmaChunk(surfaceOutputStructureName);
|
|
}
|
|
|
|
public abstract void DoSlotsForConfiguration(PixelShaderNode node);
|
|
|
|
public virtual int GetFirstPassSlotId()
|
|
{
|
|
return NormalSlotId;
|
|
}
|
|
}
|
|
}
|