浏览代码

Fix more comments

/feature-ReflectionProbeFit
Evgenii Golubev 7 年前
当前提交
2144782f
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2
      ScriptableRenderPipeline/Core/ShaderLibrary/CommonLighting.hlsl
  2. 4
      ScriptableRenderPipeline/Core/ShaderLibrary/ImageBasedLighting.hlsl

2
ScriptableRenderPipeline/Core/ShaderLibrary/CommonLighting.hlsl


// For one, it does not solve the incorrect lookup direction problem, since the normal itself
// is not modified. There is a more insidious issue, however. 'NdotV' is a constituent element
// of the mathematical system describing the relationships between different vectors - and
// not just normal and view vectors, but also light vectors, real vectors, tangent vectors, etc.
// not just normal and view vectors, but also light vectors, half vectors, tangent vectors, etc.
// Changing only one angle (or its cosine) leaves the system in an inconsistent state, where
// certain relationships can take on different values depending on whether 'NdotV' is used
// in the calculation or not. Therefore, it is important to change the normal (or another

4
ScriptableRenderPipeline/Core/ShaderLibrary/ImageBasedLighting.hlsl


H = sqrt(u.x / (1.0 - u.x)) * (roughnessT * cos(TWO_PI * u.y) * tangentX + roughnessB * sin(TWO_PI * u.y) * tangentY) + N;
H = normalize(H);
// Convert sample from real angle to incident angle
// Convert sample from half angle to incident angle
L = 2.0 * saturate(dot(V, H)) * H - V;
}

uint x = BinarySearchRow(y, s.y, conditionalDensities, width - 1);
// Compute the coordinates of the sample.
// Note: we take the sample in between two texels, and also apply the real-texel offset.
// Note: we take the sample in between two texels, and also apply the half-texel offset.
// We could compute fractional coordinates at the cost of 4 extra texel samples.
real u = saturate((real)x / width + 1.0 / width);
real v = saturate((real)y / height + 1.0 / height);

正在加载...
取消
保存