浏览代码

Add comments

/Yibing-Project-2
GitHub 7 年前
当前提交
cc837bbc
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/VolumetricLighting.cs

6
ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/VolumetricLighting.cs


// Ref: https://en.wikipedia.org/wiki/Close-packing_of_equal_spheres
// The returned {x, y} coordinates (all spheres) are all within the (-0.5, 0.5)^2 range.
// Maximizes the resolution along diagonals. This is where it matters the most.
// Here's the version rotated by 15 degrees which maximizes the resolution along X and Y:
// Maximizes the resolution along diagonals. This is where it matters the most (for lights).
// Here's the version rotated by 15 degrees which maximizes the resolution along X and Y (for surfaces):
// If you further rotate it by 45 degrees, you end up with the original pattern.
// If you further rotate it by 45 degrees (60 in total), you end up with the original pattern.
Vector2[] GetHexagonalClosePackedSpheres7()
{
Vector2[] coords = new Vector2[7];

正在加载...
取消
保存