浏览代码

Optimize and remove dead code

/main
Evgenii Golubev 8 年前
当前提交
7d07a953
共有 1 个文件被更改,包括 3 次插入19 次删除
  1. 22
      Assets/ScriptableRenderLoop/HDRenderPipeline/SceneSettings/SubsurfaceScatteringParameters.cs

22
Assets/ScriptableRenderLoop/HDRenderPipeline/SceneSettings/SubsurfaceScatteringParameters.cs


get
{
SubsurfaceScatteringProfile profile = new SubsurfaceScatteringProfile();
profile.stdDev1 = new Color(0.3f, 0.3f, 0.3f, 0.0f);
profile.stdDev2 = new Color(1.0f, 1.0f, 1.0f, 0.0f);
profile.lerpWeight = 0.5f;
profile.m_StdDev1 = new Color(0.3f, 0.3f, 0.3f, 0.0f);
profile.m_StdDev2 = new Color(1.0f, 1.0f, 1.0f, 0.0f);
profile.m_LerpWeight = 0.5f;
profile.ComputeKernel();
return profile;
}

static float GaussianCombinationCdfInverse(float p, float stdDev1, float stdDev2, float lerpWeight)
{
return Mathf.Lerp(NormalCdfInverse(p, stdDev1), NormalCdfInverse(p, stdDev2), lerpWeight);
}
// Ref: https://en.wikipedia.org/wiki/Halton_sequence
static float VanDerCorput(uint b, uint i)
{
float r = 0;
float f = 1;
while (i > 0)
{
f = f / b;
r = r + f * (i % b);
i = i / b;
}
return r;
}
// Ref: http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html

正在加载...
取消
保存