浏览代码

Implement a small LTC optimization

/main
Evgenii Golubev 8 年前
当前提交
87dfa441
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Assets/ScriptableRenderLoop/ShaderLibrary/AreaLighting.hlsl

4
Assets/ScriptableRenderLoop/ShaderLibrary/AreaLighting.hlsl


L[3] = normalize(L[3]);
L4 = L[0];
break;
default: // 1, 2, 5
case 5:
L[3] = normalize(L[3]);
L4 = normalize(L4);
break;

if (n == 5)
sum += IntegrateEdge(L4, L[0]);
sum *= INV_TWO_PI; // Normalization of the integral of cosine over the sphere
sum *= INV_TWO_PI; // Normalization
return twoSided ? abs(sum) : max(sum, 0.0);
}

正在加载...
取消
保存