您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

44 行
1.3 KiB

namespace UnityEngine.Experimental.Rendering.LightweightPipeline
{
public enum ShaderPathID
{
STANDARD_PBS = 0,
STANDARD_SIMPLE_LIGHTING,
STANDARD_UNLIT,
STANDARD_TERRAIN,
STANDARD_PARTICLES_LIT,
STANDARD_PARTICLES_UNLIT,
HIDDEN_BLIT,
HIDDEN_DEPTH_COPY,
SHADER_PATH_COUNT
}
public static class LightweightShaderUtils
{
private static readonly string[] m_ShaderPaths =
{
"LightweightPipeline/Standard (Physically Based)",
"LightweightPipeline/Standard (Simple Lighting)",
"LightweightPipeline/Standard Unlit",
"LightweightPipeline/Terrain/Standard Terrain",
"LightweightPipeline/Particles/Standard",
"LightweightPipeline/Particles/Standard Unlit",
"Hidden/LightweightPipeline/Blit",
"Hidden/LightweightPipeline/CopyDepth"
};
public static string GetShaderPath(ShaderPathID id)
{
int index = (int)id;
if (index < 0 && index >= (int)ShaderPathID.SHADER_PATH_COUNT)
{
Debug.LogError("Trying to access lightweight shader path out of bounds");
return "";
}
return m_ShaderPaths[index];
}
}
}