浏览代码

Merge pull request #952 from Unity-Technologies/taa-edit-mode-fix

Fixed TAA only partially working in edit mode
/main
GitHub 7 年前
当前提交
13f72d27
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs


{
// If TAA is enabled projMatrix will hold a jittered projection matrix. The original,
// non-jittered projection matrix can be accessed via nonJitteredProjMatrix.
bool taaEnabled = Application.isPlaying && camera.cameraType == CameraType.Game &&
bool taaEnabled = camera.cameraType == CameraType.Game &&
CoreUtils.IsTemporalAntialiasingActive(postProcessLayer);
var nonJitteredCameraProj = camera.projectionMatrix;

isFirstFrame = false;
}
const uint taaFrameCount = 8;
taaFrameIndex = taaEnabled ? (uint)Time.renderedFrameCount % taaFrameCount : 0;
taaFrameIndex = taaEnabled ? (uint)postProcessLayer.temporalAntialiasing.sampleIndex : 0;
taaFrameRotation = new Vector2(Mathf.Sin(taaFrameIndex * (0.5f * Mathf.PI)),
Mathf.Cos(taaFrameIndex * (0.5f * Mathf.PI)));

正在加载...
取消
保存