浏览代码

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

/main
Sebastien Lagarde 8 年前
当前提交
643cb34e
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 9
      Assets/ScriptableRenderLoop/HDRenderLoop/Utilities.cs

9
Assets/ScriptableRenderLoop/HDRenderLoop/Utilities.cs


// The actual projection matrix used in shaders is actually massaged a bit to work across all platforms
// (different Z value ranges etc.)
var gpuProj = GL.GetGPUProjectionMatrix(projectionMatrix, false);
var gpuVP = gpuProj * worldToViewMatrix;
var gpuVP = gpuProj * worldToViewMatrix * Matrix4x4.Scale(new Vector3(1.0f, 1.0f, -1.0f)); // Need to scale -1.0 on Z to match what is being done in the camera.wolrdToCameraMatrix API.
return gpuVP;
}

return GetViewProjectionMatrix(camera.worldToCameraMatrix, camera.projectionMatrix);
// The actual projection matrix used in shaders is actually massaged a bit to work across all platforms
// (different Z value ranges etc.)
var gpuProj = GL.GetGPUProjectionMatrix(camera.projectionMatrix, false);
var gpuVP = gpuProj * camera.worldToCameraMatrix;
return gpuVP;
}
public static Vector4 ComputeScreenSize(Camera camera)

正在加载...
取消
保存