浏览代码

HDRenderPipeline: Small fix for SSS script

/Yibing-Project-2
sebastienlagarde 7 年前
当前提交
f9b907e8
共有 1 个文件被更改,包括 17 次插入1 次删除
  1. 18
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs

18
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs


{
CheckOutFile(VSCEnabled, mat);
int ivalue = mat.GetInt("_SubsurfaceProfile");
mat.SetInt("_SubsurfaceProfile", ivalue + 1);
if (ivalue == 15)
{
mat.SetInt("_SubsurfaceProfile", 0);
}
else
{
mat.SetInt("_SubsurfaceProfile", ivalue + 1);
}
EditorUtility.SetDirty(mat);
}
}

for (int x = 0; x < numLayer; ++x)
{
int ivalue = mat.GetInt("_SubsurfaceProfile" + x);
if (ivalue == 15)
{
mat.SetInt("_SubsurfaceProfile" + x, 0);
}
else
{
mat.SetInt("_SubsurfaceProfile" + x, ivalue + 1);
}
mat.SetInt("_SubsurfaceProfile" + x, ivalue + 1);
}
EditorUtility.SetDirty(mat);

正在加载...
取消
保存