浏览代码

[HDCameraEditor] Cleaned HDRenderPipelineAsset Inspector

/main
Frédéric Vauchelles 7 年前
当前提交
cedc5804
共有 2 个文件被更改,包括 3 次插入46 次删除
  1. 16
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineInspector.Styles.cs
  2. 33
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineInspector.cs

16
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineInspector.Styles.cs


using UnityEngine;
using UnityEngine;
namespace UnityEditor.Experimental.Rendering.HDPipeline
{

// Rendering Settings
public readonly GUIContent renderingSettingsLabel = new GUIContent("Rendering Settings");
public readonly GUIContent useForwardRenderingOnly = new GUIContent("Use Forward Rendering Only");
public readonly GUIContent useDepthPrepassWithDeferredRendering = new GUIContent("Use Depth Prepass with Deferred rendering");
public readonly GUIContent renderAlphaTestOnlyInDeferredPrepass = new GUIContent("Alpha Test Only");
public readonly GUIContent enableAsyncCompute = new GUIContent("Enable Async Compute");
public readonly GUIContent enableShadowMask = new GUIContent("Enable Shadow Mask");
// LightLoop Settings
public readonly GUIContent lightLoopSettings = new GUIContent("Light Loop Settings");
public readonly GUIContent enableTileAndCluster = new GUIContent("Tile/Clustered");
public readonly GUIContent enableComputeLightEvaluation = new GUIContent("Compute Light Evaluation");
public readonly GUIContent enableComputeLightVariants = new GUIContent("Compute Light Variants");
public readonly GUIContent enableComputeMaterialVariants = new GUIContent("Compute Material Variants");
public readonly GUIContent enableFptlForForwardOpaque = new GUIContent("Fptl for forward opaque");
public readonly GUIContent enableBigTilePrepass = new GUIContent("Big tile prepass");
public readonly GUIContent sssSettings = new GUIContent("Subsurface Scattering Settings");
}

33
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineInspector.cs


namespace UnityEditor.Experimental.Rendering.HDPipeline
{
using CED = CoreEditorDrawer<FrameSettingsUI, SerializedFrameSettings>;
using _ = CoreEditorUtils;
[CustomEditor(typeof(HDRenderPipelineAsset))]
public sealed partial class HDRenderPipelineInspector : HDBaseEditor<HDRenderPipelineAsset>

SerializedProperty m_SkyReflectionSize;
SerializedProperty m_SkyLightingOverrideLayerMask;
// FrameSettings
// LightLoop settings
SerializedProperty m_enableTileAndCluster;
SerializedProperty m_enableSplitLightEvaluation;
SerializedProperty m_enableComputeLightEvaluation;
SerializedProperty m_enableComputeLightVariants;
SerializedProperty m_enableComputeMaterialVariants;
SerializedProperty m_enableFptlForForwardOpaque;
SerializedProperty m_enableBigTilePrepass;
// Rendering Settings
SerializedProperty m_RenderingUseForwardOnly;
SerializedProperty m_RenderingUseDepthPrepass;
SerializedProperty m_RenderingUseDepthPrepassAlphaTestOnly;
SerializedProperty m_enableAsyncCompute;
SerializedProperty m_enableShadowMask;
// Subsurface Scattering Settings
SerializedProperty m_SubsurfaceScatteringSettings;

//m_ReflectionCacheCompressed = properties.Find(x => x.globalFrameSettings.lightLoopSettings.reflectionCacheCompressed);
m_SkyReflectionSize = properties.Find(x => x.renderPipelineSettings.lightLoopSettings.skyReflectionSize);
m_SkyLightingOverrideLayerMask = properties.Find(x => x.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask);
// FrameSettings
// LightLoop settings
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);
// Rendering Settings
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);
m_enableShadowMask = properties.Find(x => x.serializedFrameSettings.enableShadowMask);
// Subsurface Scattering Settings
m_SubsurfaceScatteringSettings = properties.Find(x => x.sssSettings);

SettingsUI(m_Target);
EditorGUILayout.LabelField(s_Styles.defaultFrameSettings, EditorStyles.boldLabel);
k_FrameSettings.Draw(m_FrameSettingsUI, serializedFrameSettings, this);
serializedObject.ApplyModifiedProperties();

正在加载...
取消
保存