浏览代码

Add global/local/debug system (Working version)

/feature-ReflectionProbeFit
sebastienlagarde 7 年前
当前提交
1dc58532
共有 9 个文件被更改,包括 139 次插入61 次删除
  1. 18
      ScriptableRenderPipeline/HDRenderPipeline/Camera/HDAdditionalCameraData.cs
  2. 33
      ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.Styles.cs
  4. 85
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
  5. 5
      ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs
  6. 49
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
  7. 1
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs
  8. 1
      ScriptableRenderPipeline/HDRenderPipeline/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs
  9. 6
      ScriptableRenderPipeline/HDRenderPipeline/RenderPipeline/FrameSettings.cs

18
ScriptableRenderPipeline/HDRenderPipeline/Camera/HDAdditionalCameraData.cs


namespace UnityEngine.Experimental.Rendering.HDPipeline
{
// This struct allow to add specialized path in HDRenderPipeline (can be use to render mini map or planar reflection etc...)
public enum RenderingPathHDRP { Default, Unlit };
public RenderingPathHDRP renderingPath;
// This struct allow to add specialized path in HDRenderPipeline (can be use to render mini map or planar reflection etc...)
public enum RenderingPath
{
Default,
Unlit, // Preset
Custom // Fine grained
};
public RenderingPath renderingPath;
public FrameSettings frameSettings = new FrameSettings();
Camera m_camera;
Camera m_camera;
// When LDR, unity render in 8bitSRGB, then do a final shader with sRGB conversion
// When LDR, unity render in 8bitSRGB, then do a final shader with sRGB conversion
// What should be done is just in our Post process we convert to sRGB and store in a linear 10bit, but require C++ change...
m_camera = GetComponent<Camera>();
m_camera.allowHDR = false;

33
ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs


lightingDebugSettings.debugLightingMode = value;
}
public void RegisterDebug()
public void RegisterDebug(FrameSettings debugSettings)
{
DebugMenuManager.instance.AddDebugItem<float>("Display Stats", "Frame Rate", () => 1.0f / Time.smoothDeltaTime, null, DebugItemFlag.DynamicDisplay);
DebugMenuManager.instance.AddDebugItem<float>("Display Stats", "Frame Time (ms)", () => Time.smoothDeltaTime * 1000.0f, null, DebugItemFlag.DynamicDisplay);

DebugMenuManager.instance.AddDebugItem<Attributes.DebugViewProperties>("Material", "Properties", () => materialDebugSettings.debugViewProperties, (value) => SetDebugViewProperties((Attributes.DebugViewProperties)value));
DebugMenuManager.instance.AddDebugItem<int>("Material", "GBuffer",() => materialDebugSettings.debugViewGBuffer, (value) => SetDebugViewGBuffer((int)value), DebugItemFlag.None, new DebugItemHandlerIntEnum(MaterialDebugSettings.debugViewMaterialGBufferStrings, MaterialDebugSettings.debugViewMaterialGBufferValues));
/*
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, bool>(kEnableShadowDebug, () => lightingDebugSettings.enableShadows, (value) => lightingDebugSettings.enableShadows = (bool)value);
*/
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Enable Subsurface Scattering", () => debugSettings.lightingSettings.enableSSSAndTransmission, (value) => debugSettings.lightingSettings.enableSSSAndTransmission = (bool)value);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, bool>(kEnableShadowDebug, () => debugSettings.lightingSettings.enableShadow, (value) => debugSettings.lightingSettings.enableShadow = (bool)value);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, ShadowMapDebugMode>(kShadowDebugMode, () => lightingDebugSettings.shadowDebugMode, (value) => lightingDebugSettings.shadowDebugMode = (ShadowMapDebugMode)value);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, bool>(kShadowSelectionDebug, () => lightingDebugSettings.shadowDebugUseSelection, (value) => lightingDebugSettings.shadowDebugUseSelection = (bool)value, DebugItemFlag.EditorOnly);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, uint>(kShadowMapIndexDebug, () => lightingDebugSettings.shadowMapIndex, (value) => lightingDebugSettings.shadowMapIndex = (uint)value, DebugItemFlag.None, new DebugItemHandlerShadowIndex(1));

DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, LightLoop.TileClusterDebug>(kTileClusterDebug,() => lightingDebugSettings.tileClusterDebug, (value) => lightingDebugSettings.tileClusterDebug = (LightLoop.TileClusterDebug)value);
DebugMenuManager.instance.AddDebugItem<LightingDebugPanel, LightLoop.TileClusterCategoryDebug>(kTileClusterCategoryDebug,() => lightingDebugSettings.tileClusterDebugByCategory, (value) => lightingDebugSettings.tileClusterDebugByCategory = (LightLoop.TileClusterCategoryDebug)value);
/*
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Display Opaque",() => renderingDebugSettings.displayOpaqueObjects, (value) => renderingDebugSettings.displayOpaqueObjects = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Display Transparency",() => renderingDebugSettings.displayTransparentObjects, (value) => renderingDebugSettings.displayTransparentObjects = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Enable Atmospheric Scattering",() => renderingDebugSettings.enableAtmosphericScattering, (value) => renderingDebugSettings.enableAtmosphericScattering = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Enable Distortion",() => renderingDebugSettings.enableDistortion, (value) => renderingDebugSettings.enableDistortion = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Enable Subsurface Scattering",() => renderingDebugSettings.enableSSSAndTransmission, (value) => renderingDebugSettings.enableSSSAndTransmission = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Allow Stereo Rendering",() => renderingDebugSettings.allowStereo, (value) => renderingDebugSettings.allowStereo = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Display Opaque",() => debugSettings.renderSettings.enableOpaqueObjects, (value) => debugSettings.renderSettings.enableOpaqueObjects = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Display Transparency",() => debugSettings.renderSettings.enableTransparentObjects, (value) => debugSettings.renderSettings.enableTransparentObjects = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Enable Atmospheric Scattering",() => debugSettings.renderSettings.enableAtmosphericScattering, (value) => debugSettings.renderSettings.enableAtmosphericScattering = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Enable Distortion",() => debugSettings.renderSettings.enableDistortion, (value) => debugSettings.renderSettings.enableDistortion = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("Rendering", "Allow Stereo Rendering",() => debugSettings.renderSettings.enableStereo, (value) => debugSettings.renderSettings.enableStereo = (bool)value);
*/
// These need to be Runtime Only because those values are held by the HDRenderPipeline asset so if user change them through the editor debug menu they might change the value in the asset without noticing it.
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Forward Only", () => debugSettings.renderSettings.enableForwardRenderingOnly, (value) => debugSettings.renderSettings.enableForwardRenderingOnly = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Deferred Depth Prepass", () => debugSettings.renderSettings.enableDepthPrepassWithDeferredRendering, (value) => debugSettings.renderSettings.enableDepthPrepassWithDeferredRendering = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Deferred Depth Prepass ATest Only", () => debugSettings.renderSettings.enableAlphaTestOnlyInDeferredPrepass, (value) => debugSettings.renderSettings.enableAlphaTestOnlyInDeferredPrepass = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Tile/Cluster", () => debugSettings.lightLoopSettings.enableTileAndCluster, (value) => debugSettings.lightLoopSettings.enableTileAndCluster = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Big Tile", () => debugSettings.lightLoopSettings.enableBigTilePrepass, (value) => debugSettings.lightLoopSettings.enableBigTilePrepass = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Compute Lighting", () => debugSettings.lightLoopSettings.enableComputeLightEvaluation, (value) => debugSettings.lightLoopSettings.enableComputeLightEvaluation = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Light Classification", () => debugSettings.lightLoopSettings.enableComputeLightVariants, (value) => debugSettings.lightLoopSettings.enableComputeLightVariants = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Material Classification", () => debugSettings.lightLoopSettings.enableComputeMaterialVariants, (value) => debugSettings.lightLoopSettings.enableComputeMaterialVariants = (bool)value);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Async Compute", () => debugSettings.renderSettings.enableAsyncCompute, (value) => debugSettings.renderSettings.enableAsyncCompute = (bool)value);
}
public void OnValidate()

2
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.Styles.cs


public readonly GUIContent shadowsAtlasHeight = new GUIContent("Atlas Height");
// Tile pass Settings
public readonly GUIContent tileLightLoopSettings = new GUIContent("Tile Light Loop 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");

85
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs


SerializedProperty m_DefaultDiffuseMaterial;
SerializedProperty m_DefaultShader;
// 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;
// Subsurface Scattering Settings
SerializedProperty m_SubsurfaceScatteringSettings;

m_DefaultDiffuseMaterial = properties.Find("m_DefaultDiffuseMaterial");
m_DefaultShader = properties.Find("m_DefaultShader");
// 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);
// Rendering Settings
m_enableAsyncCompute = properties.Find(x => x.defaultFrameSettings.renderSettings.enableAsyncCompute);
m_RenderingUseForwardOnly = properties.Find(x => x.defaultFrameSettings.renderSettings.enableForwardRenderingOnly);
m_RenderingUseDepthPrepass = properties.Find(x => x.defaultFrameSettings.renderSettings.enableDepthPrepassWithDeferredRendering);
m_RenderingUseDepthPrepassAlphaTestOnly = properties.Find(x => x.defaultFrameSettings.renderSettings.enableAlphaTestOnlyInDeferredPrepass);
// Subsurface Scattering Settings
m_SubsurfaceScatteringSettings = properties.Find(x => x.sssSettings);
}

method.Invoke(asset, new object[0]);
}
void LightLoopSettingsUI(HDRenderPipelineAsset renderContext)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField(s_Styles.lightLoopSettings);
EditorGUI.indentLevel++;
EditorGUI.BeginChangeCheck();
EditorGUILayout.PropertyField(m_enableTileAndCluster, s_Styles.enableTileAndCluster);
if (m_enableTileAndCluster.boolValue)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_enableBigTilePrepass, s_Styles.enableBigTilePrepass);
// Allow to disable cluster for forward opaque when in forward only (option have no effect when MSAA is enabled)
// Deferred opaque are always tiled
EditorGUILayout.PropertyField(m_enableFptlForForwardOpaque, s_Styles.enableFptlForForwardOpaque);
EditorGUILayout.PropertyField(m_enableComputeLightEvaluation, s_Styles.enableComputeLightEvaluation);
if (m_enableComputeLightEvaluation.boolValue)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_enableComputeLightVariants, s_Styles.enableComputeLightVariants);
EditorGUILayout.PropertyField(m_enableComputeMaterialVariants, s_Styles.enableComputeMaterialVariants);
EditorGUI.indentLevel--;
}
}
if (EditorGUI.EndChangeCheck())
{
HackSetDirty(renderContext); // Repaint
}
EditorGUI.indentLevel--;
}
void RendereringSettingsUI(HDRenderPipelineAsset renderContext)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField(s_Styles.renderingSettingsLabel);
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_RenderingUseForwardOnly, s_Styles.useForwardRenderingOnly);
if (!m_RenderingUseForwardOnly.boolValue) // If we are deferred
{
EditorGUILayout.PropertyField(m_RenderingUseDepthPrepass, s_Styles.useDepthPrepassWithDeferredRendering);
if (m_RenderingUseDepthPrepass.boolValue)
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(m_RenderingUseDepthPrepassAlphaTestOnly, s_Styles.renderAlphaTestOnlyInDeferredPrepass);
EditorGUI.indentLevel--;
}
}
EditorGUILayout.PropertyField(m_enableAsyncCompute, s_Styles.enableAsyncCompute);
EditorGUI.indentLevel--;
}
EditorGUILayout.Space();
EditorGUILayout.PropertyField(m_SubsurfaceScatteringSettings, s_Styles.sssSettings);
}

EditorGUI.indentLevel++;
RendereringSettingsUI(renderContext);
LightLoopSettingsUI(renderContext);
SssSettingsUI(renderContext);
EditorGUI.indentLevel--;

5
ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineMenuItems.cs


}
}
[MenuItem("Internal/HDRenderPipeline/Add \"Additional Camera Data- Frame Settings\" (if not present)")]
[MenuItem("Internal/HDRenderPipeline/Add \"Additional Camera Data\" (if not present)")]
static void AddAdditionalCameraData()
{
var cameras = UnityObject.FindObjectsOfType(typeof(Camera)) as Camera[];

// Do not add a component if there already is one.
if (camera.GetComponent<HDAdditionalCameraData>() == null)
camera.gameObject.AddComponent<HDAdditionalCameraData>();
if (camera.GetComponent<FrameSettings>() == null)
camera.gameObject.AddComponent<FrameSettings>();
}
}

49
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


DebugDisplaySettings m_DebugDisplaySettings = new DebugDisplaySettings();
static DebugDisplaySettings s_NeutralDebugDisplaySettings = new DebugDisplaySettings();
DebugDisplaySettings m_CurrentDebugDisplaySettings;
static FrameSettings s_NeutralFrameSettings = new FrameSettings();
FrameSettings m_debugSettings = new FrameSettings();
FrameSettings m_FrameSettings; // Init every frame

m_SkyManager.Build(asset.renderPipelineResources, m_IBLFilterGGX);
m_SkyManager.skySettings = skySettingsToUse;
m_DebugDisplaySettings.RegisterDebug();
m_DebugDisplaySettings.RegisterDebug(m_debugSettings);
m_DebugFullScreenTempRT = HDShaderIDs._DebugFullScreenTexture;

}
InitializeRenderStateBlocks();
RegisterDebug();
}
void RegisterDebug()
{
// These need to be Runtime Only because those values are held by the HDRenderPipeline asset so if user change them through the editor debug menu they might change the value in the asset without noticing it.
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Forward Only", () => m_debugSettings.renderSettings.enableForwardRenderingOnly, (value) => m_debugSettings.renderSettings.enableForwardRenderingOnly = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Deferred Depth Prepass", () => m_debugSettings.renderSettings.enableDepthPrepassWithDeferredRendering, (value) => m_debugSettings.renderSettings.enableDepthPrepassWithDeferredRendering = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Deferred Depth Prepass ATest Only", () => m_debugSettings.renderSettings.enableAlphaTestOnlyInDeferredPrepass, (value) => m_debugSettings.renderSettings.enableAlphaTestOnlyInDeferredPrepass = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Tile/Cluster", () => m_debugSettings.lightLoopSettings.enableTileAndCluster, (value) => m_debugSettings.lightLoopSettings.enableTileAndCluster = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Big Tile", () => m_debugSettings.lightLoopSettings.enableBigTilePrepass, (value) => m_debugSettings.lightLoopSettings.enableBigTilePrepass = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Compute Lighting", () => m_debugSettings.lightLoopSettings.enableComputeLightEvaluation, (value) => m_debugSettings.lightLoopSettings.enableComputeLightEvaluation = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Light Classification", () => m_debugSettings.lightLoopSettings.enableComputeLightVariants, (value) => m_debugSettings.lightLoopSettings.enableComputeLightVariants = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Material Classification", () => m_debugSettings.lightLoopSettings.enableComputeMaterialVariants, (value) => m_debugSettings.lightLoopSettings.enableComputeMaterialVariants = (bool)value, DebugItemFlag.RuntimeOnly);
DebugMenuManager.instance.AddDebugItem<bool>("HDRP", "Enable Async Compute", () => m_debugSettings.renderSettings.enableAsyncCompute, (value) => m_debugSettings.renderSettings.enableAsyncCompute = (bool)value, DebugItemFlag.RuntimeOnly);
}
void InitializeDebugMaterials()

continue;
// First, get aggregate of frame settings base on global settings, camera frame settings and debug settings
var cameraFrameSettings = camera.GetComponent<FrameSettings>(); // This will create Default FrameSettings if it doesn't exist
if (cameraFrameSettings == null)
{
// Provide a default one
cameraFrameSettings = s_NeutralFrameSettings;
}
m_FrameSettings = FrameSettings.InitializeFrameSettings(camera, RenderPipelineSettings.GetGlobalFrameSettings(), cameraFrameSettings, null);
var additionalCameraData = camera.GetComponent<HDAdditionalCameraData>();
// Note: the scene view camera will never have additionalCameraData
m_FrameSettings = FrameSettings.InitializeFrameSettings( camera, RenderPipelineSettings.GetGlobalFrameSettings(),
(additionalCameraData && additionalCameraData.renderingPath != HDAdditionalCameraData.RenderingPath.Default) ? additionalCameraData.frameSettings : m_Asset.defaultFrameSettings,
(camera.cameraType != CameraType.Preview && camera.cameraType != CameraType.Preview) ? m_debugSettings : null);
// This is the main command buffer used for the frame.
var cmd = CommandBufferPool.Get("");

}
var postProcessLayer = camera.GetComponent<PostProcessLayer>();
var hdCamera = HDCamera.Get(camera, postProcessLayer);
var hdCamera = HDCamera.Get(camera, postProcessLayer);
Resize(camera);

// We have to bind the material specific global parameters in this mode
m_MaterialList.ForEach(material => material.Bind());
var additionalCameraData = camera.GetComponent<HDAdditionalCameraData>();
if (additionalCameraData && additionalCameraData.renderingPath == RenderingPathHDRP.Unlit)
if (additionalCameraData && additionalCameraData.renderingPath == HDAdditionalCameraData.RenderingPath.Unlit)
{
// TODO: Add another path dedicated to planar reflection / real time cubemap that implement simpler lighting
// It is up to the users to only send unlit object for this camera path

{
GPUFence startFence = cmd.CreateGPUFence();
renderContext.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
cmd = CommandBufferPool.Get("");
// TODO: check that 2 line below can be replace by cmd.Clear() (reset the command buffer instead of recreating it)
//CommandBufferPool.Release(cmd);
//cmd = CommandBufferPool.Get("");
cmd.Clear();
buildGPULightListsCompleteFence = m_LightLoop.BuildGPULightListsAsyncBegin(camera, renderContext, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT, startFence);
}

void RenderDBuffer(Vector3 cameraPos, ScriptableRenderContext renderContext, CommandBuffer cmd)
{
// Currently disabled
return ;
if (!m_FrameSettings.renderSettings.enableDBuffer)
return ;
using (new ProfilingSample(cmd, "DBuffer", GetSampler(CustomSamplerId.DBuffer)))
{

1
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs


set { m_RenderPipelineResources = value; }
}
public FrameSettings defaultFrameSettings = new FrameSettings(); // This are the defaultFrameSettings for all the camera and apply to sceneView
public SubsurfaceScatteringSettings sssSettings;
// Default Material / Shader

1
ScriptableRenderPipeline/HDRenderPipeline/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs


public SubsurfaceScatteringManager()
{
m_SSSBuffer0 = HDShaderIDs._SSSBufferTexture[0];
m_SSSBuffer0RT = new RenderTargetIdentifier(m_SSSBuffer0);
// Use with Jimenez

6
ScriptableRenderPipeline/HDRenderPipeline/RenderPipeline/FrameSettings.cs


namespace UnityEngine.Experimental.Rendering.HDPipeline
{
// FrameSettings contain settings for a given camera / render. This settings can change from one frame to the other
[DisallowMultipleComponent, ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
public class FrameSettings : MonoBehaviour
[Serializable]
public class FrameSettings
{
// The settings here are per frame settings.
// Each camera must have its own per frame settings

正在加载...
取消
保存