浏览代码

Tweak the area light approximation

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

5
Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl


float x = sinSqSigma;
float y = cosOmega;
float b = x * (0.5 + 0.5 * y); // Bilinear approximation of a sphere light
float z = b * sqrt(x); // Our approximation of a rectangular light
float a = f2 * b * b; // (x * b)^2
float z = b * (0.5 + 0.5 * y); // Our approximation of a rectangular light
return max(r, lerp(a, z, saturate(h))); // Horizon fade
return max(r, lerp(z * z, z, saturate(h))); // Horizon fade
#endif
#else
// 1. ClipQuadToHorizon

正在加载...
取消
保存