浏览代码

Use HDCamera.screenSize instead of HDRP.m_current[Width|Height]

/feature-ReflectionProbeFit
Robert Srinivasiah 7 年前
当前提交
68fce059
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


RenderGaussianPyramidColor(camera, cmd, renderContext, FullScreenDebugMode.FinalColorPyramid);
AccumulateDistortion(m_CullResults, hdCamera, renderContext, cmd);
RenderDistortion(cmd, m_Asset.renderPipelineResources);
RenderDistortion(cmd, m_Asset.renderPipelineResources, hdCamera);
// Final blit
if (m_FrameSettings.enablePostprocess && CoreUtils.IsPostProcessingActive(postProcessLayer))

}
}
void RenderDistortion(CommandBuffer cmd, RenderPipelineResources resources)
void RenderDistortion(CommandBuffer cmd, RenderPipelineResources resources, HDCamera hdCamera)
{
if (!m_FrameSettings.enableDistortion)
return;

// TODO: Should this be using HDCamera.screenSize?
var size = new Vector4(m_CurrentWidth, m_CurrentHeight, 1f / m_CurrentWidth, 1f / m_CurrentHeight);
var size = new Vector4(hdCamera.screenSize.x, hdCamera.screenSize.y, 1f / hdCamera.screenSize.x, 1f / hdCamera.screenSize.y);
uint x, y, z;
m_applyDistortionCS.GetKernelThreadGroupSizes(m_applyDistortionKernel, out x, out y, out z);
cmd.SetComputeTextureParam(m_applyDistortionCS, m_applyDistortionKernel, HDShaderIDs._DistortionTexture, m_DistortionBufferRT);

正在加载...
取消
保存