浏览代码

Rename to serializedFrameSettings

- rename framesettings to serializedFrameSettings
- rename m_DefaultActiveFrameSettings m_FrameSettings
/feature-ReflectionProbeFit
sebastienlagarde 7 年前
当前提交
519339f6
共有 4 个文件被更改,包括 24 次插入24 次删除
  1. 14
      ScriptableRenderPipeline/HDRenderPipeline/Camera/HDAdditionalCameraData.cs
  2. 20
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
  3. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  4. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs

14
ScriptableRenderPipeline/HDRenderPipeline/Camera/HDAdditionalCameraData.cs


// To be able to turn on/off FrameSettings properties at runtime for debugging purpose without affecting the original one
// we create a runtime copy (m_ActiveFrameSettings that is used, and any parametrization is done on serialized frameSettings)
public FrameSettings frameSettings = new FrameSettings(); // Serialize frameSettings
public FrameSettings serializedFrameSettings = new FrameSettings(); // Serialize frameSettings
FrameSettings m_ActiveFrameSettings = new FrameSettings();
public FrameSettings GetActiveFrameSettings()
FrameSettings m_FrameSettings = new FrameSettings();
public FrameSettings GetFrameSettings()
return m_ActiveFrameSettings;
return m_FrameSettings;
}
bool isRegisterDebug = false;

{
if (!isRegisterDebug)
{
FrameSettings.RegisterDebug(m_camera.name, GetActiveFrameSettings());
FrameSettings.RegisterDebug(m_camera.name, GetFrameSettings());
m_CameraRegisterName = m_camera.name;
isRegisterDebug = true;
}

m_camera = GetComponent<Camera>();
m_camera.allowHDR = false;
frameSettings.CopyTo(m_ActiveFrameSettings);
serializedFrameSettings.CopyTo(m_FrameSettings);
RegisterDebug();
}

{
// Modification of frameSettings in the inspector will call OnValidate().
// We do a copy of the settings to those effectively used
frameSettings.CopyTo(m_ActiveFrameSettings);
serializedFrameSettings.CopyTo(m_FrameSettings);
}
void OnDisable()

20
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs


// FrameSettings
// LightLoop settings
m_enableTileAndCluster = properties.Find(x => x.defaultFrameSettings.lightLoopSettings.enableTileAndCluster);
m_enableComputeLightEvaluation = properties.Find(x => x.defaultFrameSettings.lightLoopSettings.enableComputeLightEvaluation);
m_enableComputeLightVariants = properties.Find(x => x.defaultFrameSettings.lightLoopSettings.enableComputeLightVariants);
m_enableComputeMaterialVariants = properties.Find(x => x.defaultFrameSettings.lightLoopSettings.enableComputeMaterialVariants);
m_enableFptlForForwardOpaque = properties.Find(x => x.defaultFrameSettings.lightLoopSettings.enableFptlForForwardOpaque);
m_enableBigTilePrepass = properties.Find(x => x.defaultFrameSettings.lightLoopSettings.enableBigTilePrepass);
m_enableTileAndCluster = properties.Find(x => x.serializedFrameSettings.lightLoopSettings.enableTileAndCluster);
m_enableComputeLightEvaluation = properties.Find(x => x.serializedFrameSettings.lightLoopSettings.enableComputeLightEvaluation);
m_enableComputeLightVariants = properties.Find(x => x.serializedFrameSettings.lightLoopSettings.enableComputeLightVariants);
m_enableComputeMaterialVariants = properties.Find(x => x.serializedFrameSettings.lightLoopSettings.enableComputeMaterialVariants);
m_enableFptlForForwardOpaque = properties.Find(x => x.serializedFrameSettings.lightLoopSettings.enableFptlForForwardOpaque);
m_enableBigTilePrepass = properties.Find(x => x.serializedFrameSettings.lightLoopSettings.enableBigTilePrepass);
m_enableAsyncCompute = properties.Find(x => x.defaultFrameSettings.enableAsyncCompute);
m_RenderingUseForwardOnly = properties.Find(x => x.defaultFrameSettings.enableForwardRenderingOnly);
m_RenderingUseDepthPrepass = properties.Find(x => x.defaultFrameSettings.enableDepthPrepassWithDeferredRendering);
m_RenderingUseDepthPrepassAlphaTestOnly = properties.Find(x => x.defaultFrameSettings.enableAlphaTestOnlyInDeferredPrepass);
m_enableAsyncCompute = properties.Find(x => x.serializedFrameSettings.enableAsyncCompute);
m_RenderingUseForwardOnly = properties.Find(x => x.serializedFrameSettings.enableForwardRenderingOnly);
m_RenderingUseDepthPrepass = properties.Find(x => x.serializedFrameSettings.enableDepthPrepassWithDeferredRendering);
m_RenderingUseDepthPrepassAlphaTestOnly = properties.Find(x => x.serializedFrameSettings.enableAlphaTestOnlyInDeferredPrepass);
// Subsurface Scattering Settings
m_SubsurfaceScatteringSettings = properties.Find(x => x.sssSettings);

4
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


m_SkyManager.skySettings = skySettingsToUse;
m_DebugDisplaySettings.RegisterDebug();
FrameSettings.RegisterDebug("Default Camera", m_Asset.GetActiveDefaultFrameSettings());
FrameSettings.RegisterDebug("Default Camera", m_Asset.GetFrameSettings());
m_DebugFullScreenTempRT = HDShaderIDs._DebugFullScreenTexture;
// Init all samplers

var additionalCameraData = camera.GetComponent<HDAdditionalCameraData>();
// Note: the scene view camera will never have additionalCameraData
m_FrameSettings = FrameSettings.InitializeFrameSettings( camera, m_Asset.GetRenderPipelineSettings(),
(additionalCameraData && additionalCameraData.renderingPath != HDAdditionalCameraData.RenderingPath.Default) ? additionalCameraData.GetActiveFrameSettings() : m_Asset.GetActiveDefaultFrameSettings());
(additionalCameraData && additionalCameraData.renderingPath != HDAdditionalCameraData.RenderingPath.Default) ? additionalCameraData.GetFrameSettings() : m_Asset.GetFrameSettings());
// This is the main command buffer used for the frame.
var cmd = CommandBufferPool.Get("");

10
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs


// To be able to turn on/off FrameSettings properties at runtime for debugging purpose without affecting the original one
// we create a runtime copy (m_ActiveFrameSettings that is used, and any parametrization is done on serialized frameSettings)
public FrameSettings defaultFrameSettings = new FrameSettings(); // This are the defaultFrameSettings for all the camera and apply to sceneView, public to be visible in the inspector
public FrameSettings serializedFrameSettings = new FrameSettings(); // This are the defaultFrameSettings for all the camera and apply to sceneView, public to be visible in the inspector
FrameSettings m_DefaultActiveFrameSettings = new FrameSettings();
FrameSettings m_FrameSettings = new FrameSettings();
public FrameSettings GetActiveDefaultFrameSettings()
public FrameSettings GetFrameSettings()
return m_DefaultActiveFrameSettings;
return m_FrameSettings;
}
public void OnValidate()

defaultFrameSettings.CopyTo(m_DefaultActiveFrameSettings);
serializedFrameSettings.CopyTo(m_FrameSettings);
}
// Store the various RenderPipelineSettings for each platform (for now only one)

正在加载...
取消
保存