浏览代码

Cache string for pass names

/Yibing-Project-2
Frédéric Vauchelles 7 年前
当前提交
54f15320
共有 1 个文件被更改,包括 16 次插入2 次删除
  1. 18
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

18
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


Transparent
}
static readonly string[] k_ForwardPassDebugName =
{
"Forward Opaque Debug Display",
"Forward PreRefraction Debug Display",
"Forward Transparent Debug Display"
};
static readonly string[] k_ForwardPassName =
{
"Forward Opaque Display",
"Forward PreRefraction Display",
"Forward Transparent Display"
};
static readonly RenderQueueRange k_RenderQueue_PreRefraction = new RenderQueueRange { min = (int)HDRenderQueue.GeometryLast + 1, max = (int)HDRenderQueue.PreRefraction };
static readonly RenderQueueRange k_RenderQueue_Transparent = new RenderQueueRange { min = (int)HDRenderQueue.PreRefraction + 1, max = (int)HDRenderQueue.Last };

string profileName;
if (m_CurrentDebugDisplaySettings.IsDebugDisplayEnabled())
{
profileName = string.Format("Forward {0} Debug Display", pass);
profileName = k_ForwardPassDebugName[(int)pass];
profileName = string.Format("Forward {0} Display", pass);
profileName = k_ForwardPassName[(int)pass];
}
using (new ProfilingSample(cmd, profileName))

正在加载...
取消
保存