浏览代码

Merge pull request #895 from Unity-Technologies/Fix-framesettings-and-preview

Fix framesettings and preview
/main
GitHub 7 年前
当前提交
a3f9fb6c
共有 2 个文件被更改,包括 22 次插入2 次删除
  1. 2
      ScriptableRenderPipeline/Core/CoreRP/Debugging/DebugMenuManager.cs
  2. 22
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipeline/FrameSettings.cs

2
ScriptableRenderPipeline/Core/CoreRP/Debugging/DebugMenuManager.cs


public void AddDebugItem<DebugItemType>(string debugPanelName, string name, Func<object> getter, Action<object> setter = null, DebugItemFlag flags = DebugItemFlag.None, DebugItemHandler handler = null)
{
DebugPanel debugPanel = GetDebugPanel(debugPanelName);
// If the menu does not exist, create a generic one. This way, users don't have to explicitely create a new DebugMenu class if they don't need any particular overriding of default behavior.
// If the menu does not exist, create a generic one. This way, users don't have to explicitly create a new DebugMenu class if they don't need any particular overriding of default behavior.
if(debugPanel == null)
{
debugPanel = new DebugPanel<DebugPanelUI>(debugPanelName);

22
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipeline/FrameSettings.cs


aggregate.enableShadowMask = srcFrameSettings.enableShadowMask && renderPipelineSettings.supportShadowMask;
if (camera.cameraType == CameraType.Preview)
{
// remove undesired feature in preview
aggregate.enableShadow = false;
aggregate.enableContactShadows = false;
aggregate.enableSSR = false;
aggregate.enableSSAO = false;
aggregate.enableTransparentPrepass = false;
aggregate.enableMotionVectors = false;
aggregate.enableObjectMotionVectors = false;
aggregate.enableDBuffer = false;
aggregate.enableAtmosphericScattering = false;
aggregate.enableTransparentPostpass = false;
aggregate.enableDistortion = false;
aggregate.enablePostprocess = false;
aggregate.enableStereo = false;
aggregate.enableShadowMask = false;
}
LightLoopSettings.InitializeLightLoopSettings(camera, aggregate, renderPipelineSettings, srcFrameSettings, ref aggregate.lightLoopSettings);
}

{
// Register the camera into the debug menu
DebugMenuManager.instance.RemoveDebugItem(menuName, kEnableShadow);
DebugMenuManager.instance.RemoveDebugItem(menuName, kEnableContactShadows);
DebugMenuManager.instance.RemoveDebugItem(menuName, kEnableSSR);
DebugMenuManager.instance.RemoveDebugItem(menuName, kEnableSSAO);
DebugMenuManager.instance.RemoveDebugItem(menuName, kEnableSubsurfaceScattering);

DebugMenuManager.instance.RemoveDebugItem(menuName, kDeferredDepthPrepass);
DebugMenuManager.instance.RemoveDebugItem(menuName, KEnableTransparentPrepass);
DebugMenuManager.instance.RemoveDebugItem(menuName, KEnableTransparentPrepass);
DebugMenuManager.instance.RemoveDebugItem(menuName, kEnableMotionVectors);

正在加载...
取消
保存