浏览代码

Improve the Game Mode detection for TAA

/feature-ReflectionProbeFit
Evgenii Golubev 7 年前
当前提交
495ba884
共有 1 个文件被更改,包括 4 次插入11 次删除
  1. 15
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs

15
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 = camera.cameraType == CameraType.Game
&& CoreUtils.IsTemporalAntialiasingActive(postProcessLayer);
bool taaEnabled = Application.isPlaying && CoreUtils.IsTemporalAntialiasingActive(postProcessLayer);
var nonJitteredCameraProj = camera.projectionMatrix;
var cameraProj = taaEnabled

}
isFirstFrame = false;
const uint taaFrameCount = 8;
taaFrameIndex = taaEnabled ? (uint)Time.renderedFrameCount % taaFrameCount : 0;
else
{
// Warning: in the Game View, outside of the Play Mode, the counter gets stuck on a random frame.
// In this case, reset the frame index to 0.
taaFrameIndex = 0;
}
const uint taaFrameCount = 8;
taaFrameIndex = taaEnabled ? (uint)Time.renderedFrameCount % taaFrameCount : 0;
viewMatrix = gpuView;
projMatrix = gpuProj;

正在加载...
取消
保存