浏览代码

Editor UI + QualitySettings adjusting MSAA HDRP paths

/main
Robert Srinivasiah 7 年前
当前提交
42711992
共有 3 个文件被更改,包括 20 次插入4 次删除
  1. 12
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Camera/HDCamera.cs
  2. 7
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  3. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs

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


}
if (frameSettings.enableMSAA)
tempDesc.msaaSamples = HDRenderPipeline.kMsaaSamplesFixed;
{
//tempDesc.msaaSamples = HDRenderPipeline.kMsaaSamplesFixed;
var sampleCount = QualitySettings.antiAliasing;
Debug.LogFormat("Quality Settings AA value: {0}", sampleCount);
if (sampleCount < 1)
{
Debug.LogFormat("MSAA sample count clamped");
sampleCount = 1;
}
tempDesc.msaaSamples = sampleCount;
}
else
tempDesc.msaaSamples = 1;

7
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


// Detect when windows size is changing
int m_CurrentWidth;
int m_CurrentHeight;
int m_CurrentMSAASampleCount;
// Use to detect frame changes
int m_FrameCount;

var desc = hdCamera.renderTextureDesc;
var texWidth = desc.width;
var texHeight = desc.height;
var sampleCount = desc.msaaSamples;
bool resolutionChanged = (texWidth != m_CurrentWidth) || (texHeight != m_CurrentHeight);
bool resolutionChanged = (texWidth != m_CurrentWidth) ||
(texHeight != m_CurrentHeight) ||
(sampleCount != m_CurrentMSAASampleCount);
if (resolutionChanged || m_CameraDepthStencilBuffer == null)
{

// update recorded window resolution
m_CurrentWidth = texWidth;
m_CurrentHeight = texHeight;
m_CurrentMSAASampleCount = sampleCount;
}
public void PushGlobalParams(HDCamera hdCamera, CommandBuffer cmd, DiffusionProfileSettings sssParameters)

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoop.cs


kernelName += "_DepthRT";
// if MSAA is actually active, use the MSAA path
if (m_FrameSettings.enableMSAA &&
(HDRenderPipeline.kMsaaSamplesFixed > 1))
//if (m_FrameSettings.enableMSAA &&
// (HDRenderPipeline.kMsaaSamplesFixed > 1))
if (m_FrameSettings.enableMSAA)
kernelName += "_MSAA";
}
else

正在加载...
取消
保存