浏览代码

Rotate the sampling pattern by 15 degrees in order to maximize the resolution along X and Y

/Yibing-Project-2
Evgenii Golubev 7 年前
当前提交
12ec89ac
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/Volumetrics/VolumetricLighting.cs

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


coords[5] = new Vector2( r, -s);
coords[6] = new Vector2(-r, s);
// Rotate the sampling pattern by 15 degrees in order to maximize the resolution along X and Y.
const float cosTheta = 0.96592582628906828675f;
const float sinTheta = 0.25881904510252076235f;
for (int i = 0; i < 7; i++)
{
Vector2 coord = coords[i];
coords[i].x = coord.x * cosTheta - coord.y * sinTheta;
coords[i].y = coord.x * sinTheta + coord.y * cosTheta;
}
return coords;
}

正在加载...
取消
保存