浏览代码

Merge remote-tracking branch 'refs/remotes/origin/master' into pixel-depth-offset

/main
Sebastien Lagarde 8 年前
当前提交
5a53ddf1
共有 2 个文件被更改,包括 11 次插入6 次删除
  1. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  2. 15
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePass.cs

2
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


reflectionProbe = UnityEditor.SupportedRenderingFeatures.ReflectionProbe.Rotation
};
#endif
/*
*/
m_CameraColorBuffer = Shader.PropertyToID("_CameraColorTexture");
m_CameraDepthBuffer = Shader.PropertyToID("_CameraDepthTexture");

15
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePass.cs


var mat = probe.localToWorld;
Vector3 vx = mat.GetColumn(0);
Vector3 vy = mat.GetColumn(1);
Vector3 vz = mat.GetColumn(2);
Vector3 vw = mat.GetColumn(3);
vx.Normalize(); // Scale shouldn't affect the probe or its bounds
vy.Normalize();
vz.Normalize();
//Vector3 C = bnds.center; // P + boxOffset;
var C = mat.MultiplyPoint(boxOffset); // same as commented out line above when rot is identity
var C = vx * boxOffset.x + vy * boxOffset.y + vz * boxOffset.z + vw;
Vector3 vx = mat.GetColumn(0);
Vector3 vy = mat.GetColumn(1);
Vector3 vz = mat.GetColumn(2);
// transform to camera space (becomes a left hand coordinate frame in Unity since Determinant(worldToView)<0)
vx = worldToView.MultiplyVector(vx);

正在加载...
取消
保存