浏览代码

Fix clamping in GetBoxToSphereMapDistanceAttenuation()

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

2
Assets/ScriptableRenderLoop/ShaderLibrary/CommonLighting.hlsl


unL *= invHalfDiag;
// Our algorithm expects the input vector to be within the cube.
if (dot(unL, unL) > 1.0) return 0.0;
if (Max3(abs(unL.x), abs(unL.y), abs(unL.z)) > 1.0) return 0.0;
// Compute the light attenuation.
float sqDist = ComputeCubeToSphereMapSqMagnitude(unL);

正在加载...
取消
保存