浏览代码

Save 2 cycles

/Branch_Batching2
Evgenii Golubev 7 年前
当前提交
0ecd61d6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl

4
Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl


// We use a numerical fit for the above found with Mathematica.
float x = sinSqSigma;
float y = cosOmega;
float z = x * (1 + y) * saturate(0.370404036340287 * x + 0.5151639656054547 * (1 - 0.7648559657303381 * x) * y);
float l = x * (0.5 + 0.5 * y); // Bilinear approximation
float z = (x + x * y) * saturate(0.370404036340287 * x + 0.5151639656054547 * (1 - 0.7648559657303381 * x) * y);
float l = (x + x * y) * 0.5; // Bilinear approximation
float s = (sqrt(2) * x - 1);
float t = (s * s) * (y * y); // Compute the quadratic falloff from (0.707, 0)

正在加载...
取消
保存