浏览代码

Manually optimize exp()

/Yibing-Project-2
GitHub 7 年前
当前提交
54c702fd
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute

7
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/SubsurfaceScattering.compute


// We can drop the constant (s / (8 * Pi)) due to the subsequent weight renormalization.
float3 DisneyProfilePolar(float r, float3 S)
{
#if 0
#else
#define LOG2_E 1.44269504088896340736
float k = (-1.0 / 3.0) * LOG2_E;
float3 p = (k * r) * S;
float3 expOneThird = exp2(p);
#endif
return expOneThird + expOneThird * expOneThird * expOneThird;
}

正在加载...
取消
保存