namespace UnityEngine.Experimental.Rendering.HDPipeline
{
// The settings here are per frame settings.
// Each camera must have its own per frame settings
// The settings here are per frame settings.
// Each camera must have its own per frame settings
[Serializable]
public class LightingSettings
{
// Setup by users
public bool enableShadow = true ;
public bool enableSSR = true ; // Depends on DepthPyramid
public bool enableSSAO = true ;
public bool enableSSSAndTransmission = true ;
public static string kEnableShadow = "Enable Shadow" ;
public static string kEnableSSR = "Enable SSR" ;
public static string kEnableSSAO = "Enable SSAO" ;
public static string kEnableSSSAndTransmission = "Enable SSS and Transmission" ;
// Setup by system
public float diffuseGlobalDimmer = 1.0f ;
public float specularGlobalDimmer = 1.0f ;
}
public static string kForwardOnly = "Forward Only" ;
public static string kDeferredDepthPrePass = "Deferred Depth Prepass" ;
public static string kDeferredDepthPrepassATestOnly = "Deferred Depth Prepass ATest Only" ;
[Serializable]
public class RenderSettings
{
// Setup by users
public bool enableForwardRenderingOnly = false ; // TODO: Currently there is no way to strip the extra forward shaders generated by the shaders compiler, so we can switch dynamically.
public bool enableDepthPrepassWithDeferredRendering = false ;
public bool enableAlphaTestOnlyInDeferredPrepass = false ;
public static string KEnableTransparentPrepass = "Enable Transparent Prepass" ;
public static string kEnableMotionVectors = "Enable Motion Vectors" ;
public static string KEnableObjectMotionVectors = "Enable Object Motion Vectors" ;
public static string kEnableDBuffer = "Enable DBuffer" ;
public static string kEnableAtmosphericScattering = "Enable Atmospheric Scattering" ;
public static string kEnableRoughRefraction = "Enable Rough Refraction" ;
public static string kEnableTransparentPostpass = "Enable Transparent Postpass" ;
public static string kEnableDistortion = "Enable Distortion" ;
public static string kEnablePostprocess = "Enable Postprocess" ;
public bool enableTransparentPrePass = true ;
public bool enableMotionVectors = true ; // Enable/disable whole motion vectors pass (Camera + Object).
public bool enableObjectMotionVectors = true ;
public bool enableDBuffer = true ;
public bool enableAtmosphericScattering = true ;
public bool enableRoughRefraction = true ; // Depends on DepthPyramid - If not enable, just do a copy of the scene color (?) - how to disable rough refraction ?
public bool enableTransparentPostPass = true ;
public bool enableDistortion = true ;
public bool enablePostprocess = true ;
public static string kEnableStereoRendering = "Enable Stereo Rendering" ;
public static string kEnableAsyncCompute = "Enable Async Compute" ;
public bool enableStereo = false ;
public bool enableAsyncCompute = false ;
public static string kEnableOpaqueObjects = "Enable Opaque Objects" ;
public static string kEnableTransparentObjects = "Enable Transparent Objects" ;
public bool enableOpaqueObjects = true ;
public bool enableTransparentObjects = true ;
public static string kEnableMSAA = "Enable MSAA" ;
public static string kEnableShadowMask = "Enable ShadowMask" ;
public bool enableMSAA = false ;
// Lighting
// Setup by users
public bool enableShadow = true ;
public bool enableSSR = true ; // Depends on DepthPyramid
public bool enableSSAO = true ;
public bool enableSSSAndTransmission = true ;
// Setup by system
public bool enableShadowMask = false ;
}
// Setup by system
public float diffuseGlobalDimmer = 1.0f ;
public float specularGlobalDimmer = 1.0f ;
public LightingSettings lightingSettings = new LightingSettings ( ) ;
public RenderSettings renderSettings = new RenderSettings ( ) ;
// View
public bool enableForwardRenderingOnly = false ; // TODO: Currently there is no way to strip the extra forward shaders generated by the shaders compiler, so we can switch dynamically.
public bool enableDepthPrepassWithDeferredRendering = false ;
public bool enableAlphaTestOnlyInDeferredPrepass = false ;
public bool enableTransparentPrePass = true ;
public bool enableMotionVectors = true ; // Enable/disable whole motion vectors pass (Camera + Object).
public bool enableObjectMotionVectors = true ;
public bool enableDBuffer = true ;
public bool enableAtmosphericScattering = true ;
public bool enableRoughRefraction = true ; // Depends on DepthPyramid - If not enable, just do a copy of the scene color (?) - how to disable rough refraction ?
public bool enableTransparentPostPass = true ;
public bool enableDistortion = true ;
public bool enablePostprocess = true ;
public bool enableStereo = false ;
public bool enableAsyncCompute = false ;
public bool enableOpaqueObjects = true ;
public bool enableTransparentObjects = true ;
public bool enableMSAA = false ;
public bool enableShadowMask = false ;
frameSettings . lightingSettings . enableShadow = this . lightingSettings . enableShadow ;
frameSettings . lightingSettings . enableSSR = this . lightingSettings . enableSSR ;
frameSettings . lightingSettings . enableSSAO = this . lightingSettings . enableSSAO ;
frameSettings . lightingSettings . enableSSSAndTransmission = this . lightingSettings . enableSSSAndTransmission ;
frameSettings . enableShadow = this . enableShadow ;
frameSettings . enableSSR = this . enableSSR ;
frameSettings . enableSSAO = this . enableSSAO ;
frameSettings . enableSSSAndTransmission = this . enableSSSAndTransmission ;
frameSettings . lightingSettings . diffuseGlobalDimmer = this . lightingSettings . diffuseGlobalDimmer ;
frameSettings . lightingSettings . specularGlobalDimmer = this . lightingSettings . specularGlobalDimmer ;
frameSettings . diffuseGlobalDimmer = this . diffuseGlobalDimmer ;
frameSettings . specularGlobalDimmer = this . specularGlobalDimmer ;
frameSettings . renderSettings . enableForwardRenderingOnly = this . renderSettings . enableForwardRenderingOnly ;
frameSettings . renderSettings . enableDepthPrepassWithDeferredRendering = this . renderSettings . enableDepthPrepassWithDeferredRendering ;
frameSettings . renderSettings . enableAlphaTestOnlyInDeferredPrepass = this . renderSettings . enableAlphaTestOnlyInDeferredPrepass ;
frameSettings . enableForwardRenderingOnly = this . enableForwardRenderingOnly ;
frameSettings . enableDepthPrepassWithDeferredRendering = this . enableDepthPrepassWithDeferredRendering ;
frameSettings . enableAlphaTestOnlyInDeferredPrepass = this . enableAlphaTestOnlyInDeferredPrepass ;
frameSettings . renderSettings . enableTransparentPrePass = this . renderSettings . enableTransparentPrePass ;
frameSettings . renderSettings . enableMotionVectors = this . renderSettings . enableMotionVectors ;
frameSettings . renderSettings . enableObjectMotionVectors = this . renderSettings . enableObjectMotionVectors ;
frameSettings . renderSettings . enableDBuffer = this . renderSettings . enableDBuffer ;
frameSettings . renderSettings . enableAtmosphericScattering = this . renderSettings . enableAtmosphericScattering ;
frameSettings . renderSettings . enableRoughRefraction = this . renderSettings . enableRoughRefraction ;
frameSettings . renderSettings . enableTransparentPostPass = this . renderSettings . enableTransparentPostPass ;
frameSettings . renderSettings . enableDistortion = this . renderSettings . enableDistortion ;
frameSettings . renderSettings . enablePostprocess = this . renderSettings . enablePostprocess ;
frameSettings . enableTransparentPrePass = this . enableTransparentPrePass ;
frameSettings . enableMotionVectors = this . enableMotionVectors ;
frameSettings . enableObjectMotionVectors = this . enableObjectMotionVectors ;
frameSettings . enableDBuffer = this . enableDBuffer ;
frameSettings . enableAtmosphericScattering = this . enableAtmosphericScattering ;
frameSettings . enableRoughRefraction = this . enableRoughRefraction ;
frameSettings . enableTransparentPostPass = this . enableTransparentPostPass ;
frameSettings . enableDistortion = this . enableDistortion ;
frameSettings . enablePostprocess = this . enablePostprocess ;
frameSettings . renderSettings . enableStereo = this . renderSettings . enableStereo ;
frameSettings . renderSettings . enableForwardRenderingOnly = this . renderSettings . enableForwardRenderingOnly ;
frameSettings . enableStereo = this . enableStereo ;
frameSettings . enableForwardRenderingOnly = this . enableForwardRenderingOnly ;
frameSettings . renderSettings . enableOpaqueObjects = this . renderSettings . enableOpaqueObjects ;
frameSettings . renderSettings . enableTransparentObjects = this . renderSettings . enableTransparentObjects ;
frameSettings . enableOpaqueObjects = this . enableOpaqueObjects ;
frameSettings . enableTransparentObjects = this . enableTransparentObjects ;
frameSettings . renderSettings . enableAsyncCompute = this . renderSettings . enableAsyncCompute ;
frameSettings . enableAsyncCompute = this . enableAsyncCompute ;
frameSettings . renderSettings . enableMSAA = this . renderSettings . enableMSAA ;
frameSettings . enableMSAA = this . enableMSAA ;
frameSettings . renderSettings . enableShadowMask = this . renderSettings . enableShadowMask ;
frameSettings . enableShadowMask = this . enableShadowMask ;
this . lightLoopSettings . CopyTo ( frameSettings . lightLoopSettings ) ;
}
static public FrameSettings InitializeFrameSettings ( Camera camera , GlobalFrameSettings globalFrameSettings , FrameSettings frameSettings )
static public FrameSettings InitializeFrameSettings ( Camera camera , RenderPipelineSettings renderPipelineSettings , FrameSettings frameSettings )
{
FrameSettings aggregate = new FrameSettings ( ) ;
aggregate . lightingSettings . diffuseGlobalDimmer = 1.0f ;
aggregate . lightingSettings . specularGlobalDimmer = 0.0f ;
aggregate . diffuseGlobalDimmer = 1.0f ;
aggregate . specularGlobalDimmer = 0.0f ;
aggregate . lightingSettings . diffuseGlobalDimmer = 1.0f ;
aggregate . lightingSettings . specularGlobalDimmer = 1.0f ;
aggregate . diffuseGlobalDimmer = 1.0f ;
aggregate . specularGlobalDimmer = 1.0f ;
aggregate . lightingSettings . enableShadow = frameSettings . lightingSettings . enableShadow ;
aggregate . lightingSettings . enableSSR = camera . cameraType = = CameraType . Reflection ? false : frameSettings . lightingSettings . enableSSR & & globalFrameSettings . lightingSettings . supportSSR ;
aggregate . lightingSettings . enableSSAO = frameSettings . lightingSettings . enableSSAO & & globalFrameSettings . lightingSettings . supportSSAO ;
aggregate . lightingSettings . enableSSSAndTransmission = camera . cameraType = = CameraType . Reflection ? false : frameSettings . lightingSettings . enableSSSAndTransmission & & globalFrameSettings . lightingSettings . supportSSSAndTransmission ;
aggregate . enableShadow = frameSettings . enableShadow ;
aggregate . enableSSR = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enableSSR & & renderPipelineSettings . supportSSR ;
aggregate . enableSSAO = frameSettings . enableSSAO & & renderPipelineSettings . supportSSAO ;
aggregate . enableSSSAndTransmission = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enableSSSAndTransmission & & renderPipelineSettings . supportSSSAndTransmission ;
aggregate . renderSettings . enableForwardRenderingOnly = frameSettings . renderSettings . enableForwardRenderingOnly | | GL . wireframe ;
aggregate . renderSettings . enableDepthPrepassWithDeferredRendering = frameSettings . renderSettings . enableDepthPrepassWithDeferredRendering ;
aggregate . renderSettings . enableAlphaTestOnlyInDeferredPrepass = frameSettings . renderSettings . enableAlphaTestOnlyInDeferredPrepass ;
aggregate . enableForwardRenderingOnly = frameSettings . enableForwardRenderingOnly | | GL . wireframe ;
aggregate . enableDepthPrepassWithDeferredRendering = frameSettings . enableDepthPrepassWithDeferredRendering ;
aggregate . enableAlphaTestOnlyInDeferredPrepass = frameSettings . enableAlphaTestOnlyInDeferredPrepass ;
aggregate . renderSettings . enableTransparentPrePass = frameSettings . renderSettings . enableTransparentPrePass ;
aggregate . renderSettings . enableMotionVectors = camera . cameraType = = CameraType . Reflection ? false : frameSettings . renderSettings . enableMotionVectors ;
aggregate . renderSettings . enableObjectMotionVectors = camera . cameraType = = CameraType . Reflection ? false : frameSettings . renderSettings . enableObjectMotionVectors ;
aggregate . renderSettings . enableDBuffer = frameSettings . renderSettings . enableDBuffer & & globalFrameSettings . renderSettings . supportDBuffer ;
aggregate . renderSettings . enableAtmosphericScattering = frameSettings . renderSettings . enableAtmosphericScattering ;
aggregate . renderSettings . enableRoughRefraction = frameSettings . renderSettings . enableRoughRefraction ;
aggregate . renderSettings . enableTransparentPostPass = frameSettings . renderSettings . enableTransparentPostPass ;
aggregate . renderSettings . enableDistortion = camera . cameraType = = CameraType . Reflection ? false : frameSettings . renderSettings . enableDistortion ;
aggregate . enableTransparentPrePass = frameSettings . enableTransparentPrePass ;
aggregate . enableMotionVectors = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enableMotionVectors ;
aggregate . enableObjectMotionVectors = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enableObjectMotionVectors ;
aggregate . enableDBuffer = frameSettings . enableDBuffer & & renderPipelineSettings . supportDBuffer ;
aggregate . enableAtmosphericScattering = frameSettings . enableAtmosphericScattering ;
aggregate . enableRoughRefraction = frameSettings . enableRoughRefraction ;
aggregate . enableTransparentPostPass = frameSettings . enableTransparentPostPass ;
aggregate . enableDistortion = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enableDistortion ;
aggregate . renderSettings . enablePostprocess = camera . cameraType = = CameraType . Reflection ? false : frameSettings . renderSettings . enablePostprocess ;
aggregate . enablePostprocess = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enablePostprocess ;
aggregate . renderSettings . enableStereo = camera . cameraType = = CameraType . Reflection ? false : frameSettings . renderSettings . enableStereo & & UnityEngine . XR . XRSettings . isDeviceActive & & ( camera . stereoTargetEye = = StereoTargetEyeMask . Both ) ;
aggregate . enableStereo = camera . cameraType = = CameraType . Reflection ? false : frameSettings . enableStereo & & UnityEngine . XR . XRSettings . isDeviceActive & & ( camera . stereoTargetEye = = StereoTargetEyeMask . Both ) ;
aggregate . renderSettings . enableForwardRenderingOnly = aggregate . renderSettings . enableForwardRenderingOnly | | aggregate . renderSettings . enableStereo ;
aggregate . enableForwardRenderingOnly = aggregate . enableForwardRenderingOnly | | aggregate . enableStereo ;
aggregate . renderSettings . enableAsyncCompute = frameSettings . renderSettings . enableAsyncCompute ;
aggregate . enableAsyncCompute = frameSettings . enableAsyncCompute & & renderPipelineSettings . supportAsyncCompute ;
aggregate . renderSettings . enableOpaqueObjects = frameSettings . renderSettings . enableOpaqueObjects ;
aggregate . renderSettings . enableTransparentObjects = frameSettings . renderSettings . enableTransparentObjects ;
aggregate . enableOpaqueObjects = frameSettings . enableOpaqueObjects ;
aggregate . enableTransparentObjects = frameSettings . enableTransparentObjects ;
aggregate . renderSettings . enableMSAA = frameSettings . renderSettings . enableMSAA & & globalFrameSettings . renderSettings . supportMSAA ;
aggregate . enableMSAA = frameSettings . enableMSAA & & renderPipelineSettings . supportMSAA ;
aggregate . renderSettings . enableShadowMask = globalFrameSettings . lightingSettings . supportShadowMask ;
aggregate . enableShadowMask = renderPipelineSettings . supportShadowMask ;
aggregate . lightLoopSettings = LightLoopSettings . InitializeLightLoopSettings ( camera , aggregate , globalFrameSettings , frameSettings ) ;
aggregate . lightLoopSettings = LightLoopSettings . InitializeLightLoopSettings ( camera , aggregate , renderPipelineSettings , frameSettings ) ;
return aggregate ;
}
// Register the camera into the debug menu
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Shadow" , ( ) = > frameSettings . lightingSettings . enableShadow , ( value ) = > frameSettings . lightingSettings . enableShadow = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable SSR" , ( ) = > frameSettings . lightingSettings . enableSSR , ( value ) = > frameSettings . lightingSettings . enableSSR = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable SSAO" , ( ) = > frameSettings . lightingSettings . enableSSR , ( value ) = > frameSettings . lightingSettings . enableSSR = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable SSS and Transmission" , ( ) = > frameSettings . lightingSettings . enableSSSAndTransmission , ( value ) = > frameSettings . lightingSettings . enableSSSAndTransmission = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableShadow , ( ) = > frameSettings . enableShadow , ( value ) = > frameSettings . enableShadow = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableSSR , ( ) = > frameSettings . enableSSR , ( value ) = > frameSettings . enableSSR = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableSSAO , ( ) = > frameSettings . enableSSAO , ( value ) = > frameSettings . enableSSAO = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableSSSAndTransmission , ( ) = > frameSettings . enableSSSAndTransmission , ( value ) = > frameSettings . enableSSSAndTransmission = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kForwardOnly , ( ) = > frameSettings . enableForwardRenderingOnly , ( value ) = > frameSettings . enableForwardRenderingOnly = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kDeferredDepthPrepassATestOnly , ( ) = > frameSettings . enableDepthPrepassWithDeferredRendering , ( value ) = > frameSettings . enableDepthPrepassWithDeferredRendering = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , KEnableTransparentPrepass , ( ) = > frameSettings . enableAlphaTestOnlyInDeferredPrepass , ( value ) = > frameSettings . enableAlphaTestOnlyInDeferredPrepass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , KEnableTransparentPrepass , ( ) = > frameSettings . enableTransparentPrePass , ( value ) = > frameSettings . enableTransparentPrePass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableMotionVectors , ( ) = > frameSettings . enableMotionVectors , ( value ) = > frameSettings . enableMotionVectors = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , KEnableObjectMotionVectors , ( ) = > frameSettings . enableObjectMotionVectors , ( value ) = > frameSettings . enableObjectMotionVectors = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableDBuffer , ( ) = > frameSettings . enableDBuffer , ( value ) = > frameSettings . enableDBuffer = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableAtmosphericScattering , ( ) = > frameSettings . enableAtmosphericScattering , ( value ) = > frameSettings . enableAtmosphericScattering = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableRoughRefraction , ( ) = > frameSettings . enableRoughRefraction , ( value ) = > frameSettings . enableRoughRefraction = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableTransparentPostpass , ( ) = > frameSettings . enableTransparentPostPass , ( value ) = > frameSettings . enableTransparentPostPass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableDistortion , ( ) = > frameSettings . enableDistortion , ( value ) = > frameSettings . enableDistortion = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnablePostprocess , ( ) = > frameSettings . enablePostprocess , ( value ) = > frameSettings . enablePostprocess = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Forward Only" , ( ) = > frameSettings . renderSettings . enableForwardRenderingOnly , ( value ) = > frameSettings . renderSettings . enableForwardRenderingOnly = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Deferred Depth Prepass" , ( ) = > frameSettings . renderSettings . enableDepthPrepassWithDeferredRendering , ( value ) = > frameSettings . renderSettings . enableDepthPrepassWithDeferredRendering = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Deferred Depth Prepass ATest Only" , ( ) = > frameSettings . renderSettings . enableAlphaTestOnlyInDeferredPrepass , ( value ) = > frameSettings . renderSettings . enableAlphaTestOnlyInDeferredPrepass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableStereoRendering , ( ) = > frameSettings . enableStereo , ( value ) = > frameSettings . enableStereo = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableAsyncCompute , ( ) = > frameSettings . enableAsyncCompute , ( value ) = > frameSettings . enableAsyncCompute = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Transparent Prepass" , ( ) = > frameSettings . renderSettings . enableTransparentPrePass , ( value ) = > frameSettings . renderSettings . enableTransparentPrePass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Motion Vectors" , ( ) = > frameSettings . renderSettings . enableMotionVectors , ( value ) = > frameSettings . renderSettings . enableMotionVectors = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Object Motion Vectors" , ( ) = > frameSettings . renderSettings . enableObjectMotionVectors , ( value ) = > frameSettings . renderSettings . enableObjectMotionVectors = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable DBuffer" , ( ) = > frameSettings . renderSettings . enableDBuffer , ( value ) = > frameSettings . renderSettings . enableDBuffer = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Atmospheric Scattering" , ( ) = > frameSettings . renderSettings . enableAtmosphericScattering , ( value ) = > frameSettings . renderSettings . enableAtmosphericScattering = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Rough Refraction" , ( ) = > frameSettings . renderSettings . enableRoughRefraction , ( value ) = > frameSettings . renderSettings . enableRoughRefraction = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Transparent Postpass" , ( ) = > frameSettings . renderSettings . enableTransparentPostPass , ( value ) = > frameSettings . renderSettings . enableTransparentPostPass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Distortion" , ( ) = > frameSettings . renderSettings . enableDistortion , ( value ) = > frameSettings . renderSettings . enableDistortion = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Postprocess" , ( ) = > frameSettings . renderSettings . enablePostprocess , ( value ) = > frameSettings . renderSettings . enablePostprocess = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableOpaqueObjects , ( ) = > frameSettings . enableOpaqueObjects , ( value ) = > frameSettings . enableOpaqueObjects = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableTransparentObjects , ( ) = > frameSettings . enableTransparentObjects , ( value ) = > frameSettings . enableTransparentObjects = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Stereo Rendering" , ( ) = > frameSettings . renderSettings . enableStereo , ( value ) = > frameSettings . renderSettings . enableStereo = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Async Compute" , ( ) = > frameSettings . renderSettings . enableAsyncCompute , ( value ) = > frameSettings . renderSettings . enableAsyncCompute = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableMSAA , ( ) = > frameSettings . enableMSAA , ( value ) = > frameSettings . enableMSAA = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , kEnableShadowMask , ( ) = > frameSettings . enableShadowMask , ( value ) = > frameSettings . enableShadowMask = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Opaque Objects" , ( ) = > frameSettings . renderSettings . enableOpaqueObjects , ( value ) = > frameSettings . renderSettings . enableOpaqueObjects = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Transparent Objects" , ( ) = > frameSettings . renderSettings . enableTransparentObjects , ( value ) = > frameSettings . renderSettings . enableTransparentObjects = ( bool ) value ) ;
LightLoopSettings . RegisterDebug ( menuName , frameSettings . lightLoopSettings ) ;
}
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable MSAA" , ( ) = > frameSettings . renderSettings . enableMSAA , ( value ) = > frameSettings . renderSettings . enableMSAA = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable ShadowMask" , ( ) = > frameSettings . renderSettings . enableShadowMask , ( value ) = > frameSettings . renderSettings . enableShadowMask = ( bool ) value ) ;
static public void UnRegisterDebug ( String menuName )
{
// Register the camera into the debug menu
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableShadow ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableSSR ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableSSAO ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableSSSAndTransmission ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Tile/Cluster" , ( ) = > frameSettings . lightLoopSettings . enableTileAndCluster , ( value ) = > frameSettings . lightLoopSettings . enableTileAndCluster = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Big Tile" , ( ) = > frameSettings . lightLoopSettings . enableBigTilePrepass , ( value ) = > frameSettings . lightLoopSettings . enableBigTilePrepass = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Compute Lighting" , ( ) = > frameSettings . lightLoopSettings . enableComputeLightEvaluation , ( value ) = > frameSettings . lightLoopSettings . enableComputeLightEvaluation = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Light Classification" , ( ) = > frameSettings . lightLoopSettings . enableComputeLightVariants , ( value ) = > frameSettings . lightLoopSettings . enableComputeLightVariants = ( bool ) value ) ;
DebugMenuManager . instance . AddDebugItem < bool > ( menuName , "Enable Material Classification" , ( ) = > frameSettings . lightLoopSettings . enableComputeMaterialVariants , ( value ) = > frameSettings . lightLoopSettings . enableComputeMaterialVariants = ( bool ) value ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kForwardOnly ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kDeferredDepthPrepassATestOnly ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , KEnableTransparentPrepass ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , KEnableTransparentPrepass ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableMotionVectors ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , KEnableObjectMotionVectors ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableDBuffer ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableAtmosphericScattering ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableRoughRefraction ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableTransparentPostpass ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableDistortion ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnablePostprocess ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableStereoRendering ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableAsyncCompute ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableOpaqueObjects ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableTransparentObjects ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableMSAA ) ;
DebugMenuManager . instance . RemoveDebugItem ( menuName , kEnableShadowMask ) ;
LightLoopSettings . UnRegisterDebug ( menuName ) ;
}
}
}