1
0
mirror of https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git synced 2025-08-23 04:35:28 +08:00

mis-spelled

This commit is contained in:
cathy0612
2020-02-04 20:28:38 +08:00
parent 6b1e6c4585
commit c6550b0195

View File

@@ -329,7 +329,7 @@ float ShadowCalculation(vec3 fragPos)
在这里我们得到了fragment的位置与光的位置之间的不同的向量使用这个向量作为一个方向向量去对立方体贴图进行采样。方向向量不需要是单位向量所以无需对它进行标准化。最后的closestDepth是光源和它最接近的可见fragment之间的标准化的深度值。
closestDepth值现在在0到1的范围内了所以我们先将其转换0到far_plane的范围这需要把他乘以far_plane
closestDepth值现在在0到1的范围内了所以我们先将其转换0到far_plane的范围这需要把他乘以far_plane
```c++
closestDepth *= far_plane;