浏览代码

Moved disable SSS when luxmeter outside of frame settings initialization

/main
Antoine Lelievre 6 年前
当前提交
3e0249d9
共有 2 个文件被更改,包括 8 次插入8 次删除
  1. 8
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
  2. 8
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs

8
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs


FrameSettings currentFrameSettings = new FrameSettings();
// Get the effective frame settings for this camera taking into account the global setting and camera type
FrameSettings.InitializeFrameSettings(camera, m_Asset.GetRenderPipelineSettings(), m_DebugDisplaySettings, srcFrameSettings, ref currentFrameSettings);
FrameSettings.InitializeFrameSettings(camera, m_Asset.GetRenderPipelineSettings(), srcFrameSettings, ref currentFrameSettings);
// This is the main command buffer used for the frame.
var cmd = CommandBufferPool.Get("");

if (m_CurrentDebugDisplaySettings.IsDebugDisplayRemovePostprocess() || !HDUtils.IsPostProcessingActive(postProcessLayer))
{
currentFrameSettings.enablePostprocess = false;
}
// Disable SSS if luxmeter is enabled
if (debugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter)
{
currentFrameSettings.enableSubsurfaceScattering = false;
}
var hdCamera = HDCamera.Get(camera);

8
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/Settings/FrameSettings.cs


// Init a FrameSettings from renderpipeline settings, frame settings and debug settings (if any)
// This will aggregate the various option
public static void InitializeFrameSettings(Camera camera, RenderPipelineSettings renderPipelineSettings, DebugDisplaySettings debugDisplaySettings, FrameSettings srcFrameSettings, ref FrameSettings aggregate)
public static void InitializeFrameSettings(Camera camera, RenderPipelineSettings renderPipelineSettings, FrameSettings srcFrameSettings, ref FrameSettings aggregate)
{
if (aggregate == null)
aggregate = new FrameSettings();

aggregate.enableDistortion = false;
aggregate.enablePostprocess = false;
aggregate.enableStereo = false;
}
// Disable SSS if luxmeter is enabled
if (debugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.LuxMeter)
{
aggregate.enableSubsurfaceScattering = false;
}
LightLoopSettings.InitializeLightLoopSettings(camera, aggregate, renderPipelineSettings, srcFrameSettings, ref aggregate.lightLoopSettings);

正在加载...
取消
保存