594 lines
29 KiB
C#
594 lines
29 KiB
C#
using System.Reflection;
|
|
using XCEngine;
|
|
using XCEngine.Rendering;
|
|
using XCEngine.Rendering.Universal;
|
|
|
|
namespace Gameplay
|
|
{
|
|
public sealed class ScriptableRenderContextApiSurfaceProbe
|
|
: MonoBehaviour
|
|
{
|
|
public bool HasPublicContextRecordScene;
|
|
public bool HasPublicContextRecordScenePhase;
|
|
public bool HasPublicContextRecordSceneInjectionPoint;
|
|
public bool HasPublicContextDrawRenderersByType;
|
|
public bool HasPublicContextDrawRenderersByDesc;
|
|
public bool HasPublicContextDrawRenderersByDescAndSettings;
|
|
public bool HasPublicContextDrawSkybox;
|
|
public bool HasPublicContextDrawOpaqueRenderers;
|
|
public bool HasPublicContextDrawTransparentRenderers;
|
|
public bool HasPublicContextRecordOpaqueScenePhase;
|
|
public bool HasPublicContextRecordBeforeOpaqueInjection;
|
|
public bool HasPublicContextRecordShaderVectorFullscreenPass;
|
|
public bool HasPublicContextSourceColorTexture;
|
|
public bool HasPublicContextPrimaryColorTarget;
|
|
public bool HasPublicContextDepthTarget;
|
|
public bool HasPublicContextCreateTransientTexture;
|
|
public bool HasPublicContextCreateFullscreenTransientColorTexture;
|
|
public bool HasPublicContextCreateFullscreenTransientDepthTexture;
|
|
public bool HasPublicContextAddRasterPass;
|
|
public bool HasPublicContextCameraData;
|
|
public bool HasPublicContextLightingData;
|
|
public bool HasPublicContextShadowData;
|
|
public bool HasPublicContextEnvironmentData;
|
|
public bool HasPublicContextFinalColorData;
|
|
public bool HasPublicContextStageColorData;
|
|
public bool HasPublicRequestContextHasDirectionalShadow;
|
|
public bool HasPublicRequestContextClearDirectionalShadow;
|
|
public bool HasUniversalContextRecordSceneExtension;
|
|
public bool HasUniversalContextRecordOpaqueScenePhaseExtension;
|
|
public bool HasUniversalContextRecordBeforeOpaqueInjectionExtension;
|
|
public bool HasUniversalContextRecordShaderVectorFullscreenPassExtension;
|
|
public bool HasUniversalRequestContextHasDirectionalShadowExtension;
|
|
public bool HasUniversalRequestContextClearDirectionalShadowExtension;
|
|
public bool HasPublicPipelineAssetConfigureCameraFramePlan;
|
|
public bool HasPipelineAssetSetDirty;
|
|
public bool HasPipelineAssetGetRuntimeResourceVersion;
|
|
public bool HasScriptableObjectType;
|
|
public bool HasScriptableObjectCreateInstance;
|
|
public bool HasRenderPipelineAssetScriptableObjectBase;
|
|
public bool HasPlanningContextType;
|
|
public bool HasRendererFeatureConfigureCameraFramePlan;
|
|
public bool HasRendererRecordingContextType;
|
|
public bool HasRendererCameraRequestContextType;
|
|
public bool HasRendererBackedRenderPipelineAssetType;
|
|
public bool HasRendererBackedRenderPipelineType;
|
|
public bool HasRendererDrivenRenderPipelineType;
|
|
public bool HasRendererDataScriptableObjectBase;
|
|
public bool HasRendererFeatureScriptableObjectBase;
|
|
public bool HasRendererDataSetupRenderer;
|
|
public bool HasRendererDataSetDirty;
|
|
public bool HasRendererDataIsInvalidated;
|
|
public bool HasRendererSupportsRendererRecording;
|
|
public bool HasRendererRecordRenderer;
|
|
public bool HasPublicRendererSupportsStageRenderGraph;
|
|
public bool HasPublicRendererRecordStageRenderGraph;
|
|
public bool HasRenderGraphTextureHandleType;
|
|
public bool HasRenderGraphRasterPassBuilderType;
|
|
public bool HasRenderGraphRasterPassBuilderUseColorSource;
|
|
public bool HasRenderGraphRasterPassBuilderUseTexture;
|
|
public bool HasRenderGraphRasterPassBuilderSetColorAttachment;
|
|
public bool HasRenderGraphRasterPassBuilderSetColorScaleFullscreenExecution;
|
|
public bool HasRenderGraphRasterPassBuilderSetFinalColorFullscreenExecution;
|
|
public bool HasRenderGraphRasterPassBuilderCommit;
|
|
public bool HasSceneRenderPhaseType;
|
|
public bool HasSceneRenderInjectionPointType;
|
|
public bool HasRendererListType;
|
|
public bool HasDrawingSettingsType;
|
|
public bool HasCompareFunctionType;
|
|
public bool HasStencilOpType;
|
|
public bool HasDepthStateType;
|
|
public bool HasStencilFaceStateType;
|
|
public bool HasStencilStateType;
|
|
public bool HasRenderStateMaskType;
|
|
public bool HasRenderStateBlockType;
|
|
public bool HasRenderQueueRangeType;
|
|
public bool HasRendererSortModeType;
|
|
public bool HasFilteringSettingsType;
|
|
public bool HasSortingSettingsType;
|
|
public bool HasRendererListDescType;
|
|
public bool HasCommandBufferType;
|
|
public bool HasProfilingSamplerType;
|
|
public bool HasScriptableRenderPassInputType;
|
|
public bool HasRenderPassInputProperty;
|
|
public bool HasRenderPassConfigureInput;
|
|
public bool HasRenderPassRequiresIntermediateTexture;
|
|
public bool HasRenderPassProfilingSampler;
|
|
public bool HasRenderPassExecute;
|
|
public bool HasRenderPassOnCameraSetup;
|
|
public bool HasRenderPassOnCameraCleanup;
|
|
public bool HasRenderPassOnFinishCameraStackRendering;
|
|
public bool HasRenderPassComparisonOperators;
|
|
public bool HasRenderPassEventUnityNumericOrder;
|
|
public bool HasRenderPassEventEngineExtensionOrder;
|
|
|
|
public void Start()
|
|
{
|
|
const BindingFlags PublicInstanceMethodFlags =
|
|
BindingFlags.Instance | BindingFlags.Public;
|
|
System.Type contextType =
|
|
typeof(ScriptableRenderContext);
|
|
System.Type requestContextType =
|
|
typeof(CameraRenderRequestContext);
|
|
System.Type pipelineAssetType =
|
|
typeof(ScriptableRenderPipelineAsset);
|
|
System.Type scriptableObjectType =
|
|
typeof(Object).Assembly.GetType(
|
|
"XCEngine.ScriptableObject");
|
|
System.Type rasterPassBuilderType =
|
|
typeof(RenderGraphRasterPassBuilder);
|
|
System.Type rendererFeatureType =
|
|
typeof(ScriptableRendererFeature);
|
|
System.Type rendererDataType =
|
|
typeof(ScriptableRendererData);
|
|
System.Type rendererType =
|
|
typeof(ScriptableRenderer);
|
|
System.Type renderPassType =
|
|
typeof(ScriptableRenderPass);
|
|
System.Type commandBufferType =
|
|
typeof(CommandBuffer);
|
|
System.Type profilingSamplerType =
|
|
typeof(ProfilingSampler);
|
|
System.Type renderPassInputType =
|
|
typeof(ScriptableRenderPassInput);
|
|
System.Type universalAssemblyType =
|
|
typeof(ScriptableRendererFeature);
|
|
System.Reflection.Assembly universalAssembly =
|
|
universalAssemblyType.Assembly;
|
|
System.Type renderContextExtensionsType =
|
|
universalAssembly.GetType(
|
|
"XCEngine.Rendering.Universal.ScriptableRenderContextExtensions");
|
|
System.Type requestContextExtensionsType =
|
|
universalAssembly.GetType(
|
|
"XCEngine.Rendering.Universal.CameraRenderRequestContextExtensions");
|
|
|
|
HasPublicContextRecordScene =
|
|
contextType.GetMethod(
|
|
"RecordScene",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextRecordScenePhase =
|
|
contextType.GetMethod(
|
|
"RecordScenePhase",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextRecordSceneInjectionPoint =
|
|
contextType.GetMethod(
|
|
"RecordSceneInjectionPoint",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextDrawRenderersByType =
|
|
contextType.GetMethod(
|
|
"DrawRenderers",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(SceneRenderPhase),
|
|
typeof(RendererListType)
|
|
},
|
|
null) != null;
|
|
HasPublicContextDrawRenderersByDesc =
|
|
contextType.GetMethod(
|
|
"DrawRenderers",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(SceneRenderPhase),
|
|
typeof(RendererListDesc)
|
|
},
|
|
null) != null;
|
|
HasPublicContextDrawRenderersByDescAndSettings =
|
|
contextType.GetMethod(
|
|
"DrawRenderers",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(SceneRenderPhase),
|
|
typeof(RendererListDesc),
|
|
typeof(DrawingSettings)
|
|
},
|
|
null) != null;
|
|
HasPublicContextDrawSkybox =
|
|
contextType.GetMethod(
|
|
"DrawSkybox",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextDrawOpaqueRenderers =
|
|
contextType.GetMethod(
|
|
"DrawOpaqueRenderers",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextDrawTransparentRenderers =
|
|
contextType.GetMethod(
|
|
"DrawTransparentRenderers",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextRecordOpaqueScenePhase =
|
|
contextType.GetMethod(
|
|
"RecordOpaqueScenePhase",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextRecordBeforeOpaqueInjection =
|
|
contextType.GetMethod(
|
|
"RecordBeforeOpaqueInjection",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextRecordShaderVectorFullscreenPass =
|
|
contextType.GetMethod(
|
|
"RecordShaderVectorFullscreenPass",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextSourceColorTexture =
|
|
contextType.GetProperty(
|
|
"sourceColorTexture",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextPrimaryColorTarget =
|
|
contextType.GetProperty(
|
|
"primaryColorTarget",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextDepthTarget =
|
|
contextType.GetProperty(
|
|
"depthTarget",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextCreateTransientTexture =
|
|
contextType.GetMethod(
|
|
"CreateTransientTexture",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextCreateFullscreenTransientColorTexture =
|
|
contextType.GetMethod(
|
|
"CreateFullscreenTransientColorTexture",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextCreateFullscreenTransientDepthTexture =
|
|
contextType.GetMethod(
|
|
"CreateFullscreenTransientDepthTexture",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextAddRasterPass =
|
|
contextType.GetMethod(
|
|
"AddRasterPass",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextCameraData =
|
|
contextType.GetProperty(
|
|
"cameraData",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextLightingData =
|
|
contextType.GetProperty(
|
|
"lightingData",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextShadowData =
|
|
contextType.GetProperty(
|
|
"shadowData",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextEnvironmentData =
|
|
contextType.GetProperty(
|
|
"environmentData",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextFinalColorData =
|
|
contextType.GetProperty(
|
|
"finalColorData",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicContextStageColorData =
|
|
contextType.GetProperty(
|
|
"stageColorData",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicRequestContextHasDirectionalShadow =
|
|
requestContextType.GetProperty(
|
|
"hasDirectionalShadow",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicRequestContextClearDirectionalShadow =
|
|
requestContextType.GetMethod(
|
|
"ClearDirectionalShadow",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasUniversalContextRecordSceneExtension =
|
|
renderContextExtensionsType != null &&
|
|
renderContextExtensionsType.GetMethod(
|
|
"RecordScene",
|
|
BindingFlags.Static | BindingFlags.Public) != null;
|
|
HasUniversalContextRecordOpaqueScenePhaseExtension =
|
|
renderContextExtensionsType != null &&
|
|
renderContextExtensionsType.GetMethod(
|
|
"RecordOpaqueScenePhase",
|
|
BindingFlags.Static | BindingFlags.Public) != null;
|
|
HasUniversalContextRecordBeforeOpaqueInjectionExtension =
|
|
renderContextExtensionsType != null &&
|
|
renderContextExtensionsType.GetMethod(
|
|
"RecordBeforeOpaqueInjection",
|
|
BindingFlags.Static | BindingFlags.Public) != null;
|
|
HasUniversalContextRecordShaderVectorFullscreenPassExtension =
|
|
renderContextExtensionsType != null &&
|
|
renderContextExtensionsType.GetMethod(
|
|
"RecordShaderVectorFullscreenPass",
|
|
BindingFlags.Static | BindingFlags.Public) != null;
|
|
HasUniversalRequestContextHasDirectionalShadowExtension =
|
|
requestContextExtensionsType != null &&
|
|
requestContextExtensionsType.GetMethod(
|
|
"HasDirectionalShadow",
|
|
BindingFlags.Static | BindingFlags.Public) != null;
|
|
HasUniversalRequestContextClearDirectionalShadowExtension =
|
|
requestContextExtensionsType != null &&
|
|
requestContextExtensionsType.GetMethod(
|
|
"ClearDirectionalShadow",
|
|
BindingFlags.Static | BindingFlags.Public) != null;
|
|
HasPublicPipelineAssetConfigureCameraFramePlan =
|
|
pipelineAssetType.GetMethod(
|
|
"ConfigureCameraFramePlan",
|
|
BindingFlags.Instance |
|
|
BindingFlags.Public |
|
|
BindingFlags.NonPublic) != null;
|
|
HasPipelineAssetSetDirty =
|
|
pipelineAssetType.GetMethod(
|
|
"SetDirty",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasPipelineAssetGetRuntimeResourceVersion =
|
|
pipelineAssetType.GetMethod(
|
|
"GetRuntimeResourceVersionInstance",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasScriptableObjectType =
|
|
scriptableObjectType != null;
|
|
HasScriptableObjectCreateInstance =
|
|
scriptableObjectType != null &&
|
|
scriptableObjectType.GetMethod(
|
|
"CreateInstance",
|
|
BindingFlags.Static |
|
|
BindingFlags.Public) != null;
|
|
HasRenderPipelineAssetScriptableObjectBase =
|
|
scriptableObjectType != null &&
|
|
pipelineAssetType.BaseType == scriptableObjectType;
|
|
HasPlanningContextType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.ScriptableRenderPipelinePlanningContext") != null;
|
|
HasRendererFeatureConfigureCameraFramePlan =
|
|
rendererFeatureType.GetMethod(
|
|
"ConfigureCameraFramePlan",
|
|
BindingFlags.Instance |
|
|
BindingFlags.Public |
|
|
BindingFlags.NonPublic) != null;
|
|
HasRendererRecordingContextType =
|
|
System.Type.GetType(
|
|
"XCEngine.Rendering.Universal.RendererRecordingContext, XCEngine.RenderPipelines.Universal") != null;
|
|
HasRendererCameraRequestContextType =
|
|
System.Type.GetType(
|
|
"XCEngine.Rendering.Universal.RendererCameraRequestContext, XCEngine.RenderPipelines.Universal") != null;
|
|
HasRendererBackedRenderPipelineAssetType =
|
|
System.Type.GetType(
|
|
"XCEngine.Rendering.Universal.RendererBackedRenderPipelineAsset, XCEngine.RenderPipelines.Universal") != null;
|
|
HasRendererBackedRenderPipelineType =
|
|
System.Type.GetType(
|
|
"XCEngine.Rendering.Universal.RendererBackedRenderPipeline, XCEngine.RenderPipelines.Universal") != null;
|
|
HasRendererDrivenRenderPipelineType =
|
|
System.Type.GetType(
|
|
"XCEngine.Rendering.Universal.RendererDrivenRenderPipeline, XCEngine.RenderPipelines.Universal") != null;
|
|
HasRendererDataScriptableObjectBase =
|
|
scriptableObjectType != null &&
|
|
rendererDataType.BaseType == scriptableObjectType;
|
|
HasRendererFeatureScriptableObjectBase =
|
|
scriptableObjectType != null &&
|
|
rendererFeatureType.BaseType == scriptableObjectType;
|
|
HasRendererDataSetupRenderer =
|
|
rendererDataType.GetMethod(
|
|
"SetupRenderer",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasRendererDataSetDirty =
|
|
rendererDataType.GetMethod(
|
|
"SetDirty",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasRendererDataIsInvalidated =
|
|
rendererDataType.GetProperty(
|
|
"isInvalidated",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic |
|
|
BindingFlags.Public) != null;
|
|
HasRendererSupportsRendererRecording =
|
|
rendererType.GetMethod(
|
|
"SupportsRendererRecording",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasRendererRecordRenderer =
|
|
rendererType.GetMethod(
|
|
"RecordRenderer",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasPublicRendererSupportsStageRenderGraph =
|
|
rendererType.GetMethod(
|
|
"SupportsStageRenderGraph",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasPublicRendererRecordStageRenderGraph =
|
|
rendererType.GetMethod(
|
|
"RecordStageRenderGraph",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderGraphTextureHandleType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RenderGraphTextureHandle") != null;
|
|
HasRenderGraphRasterPassBuilderType =
|
|
rasterPassBuilderType != null;
|
|
HasRenderGraphRasterPassBuilderUseColorSource =
|
|
rasterPassBuilderType.GetMethod(
|
|
"UseColorSource",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderGraphRasterPassBuilderUseTexture =
|
|
rasterPassBuilderType.GetMethod(
|
|
"UseTexture",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderGraphRasterPassBuilderSetColorAttachment =
|
|
rasterPassBuilderType.GetMethod(
|
|
"SetColorAttachment",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderGraphRasterPassBuilderSetColorScaleFullscreenExecution =
|
|
rasterPassBuilderType.GetMethod(
|
|
"SetColorScaleFullscreenExecution",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderGraphRasterPassBuilderSetFinalColorFullscreenExecution =
|
|
rasterPassBuilderType.GetMethod(
|
|
"SetFinalColorFullscreenExecution",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderGraphRasterPassBuilderCommit =
|
|
rasterPassBuilderType.GetMethod(
|
|
"Commit",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasSceneRenderPhaseType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.SceneRenderPhase") != null;
|
|
HasSceneRenderInjectionPointType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.SceneRenderInjectionPoint") != null;
|
|
HasRendererListType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RendererListType") != null;
|
|
HasDrawingSettingsType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.DrawingSettings") != null;
|
|
HasCompareFunctionType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.CompareFunction") != null;
|
|
HasStencilOpType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.StencilOp") != null;
|
|
HasDepthStateType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.DepthState") != null;
|
|
HasStencilFaceStateType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.StencilFaceState") != null;
|
|
HasStencilStateType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.StencilState") != null;
|
|
HasRenderStateMaskType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RenderStateMask") != null;
|
|
HasRenderStateBlockType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RenderStateBlock") != null;
|
|
HasRenderQueueRangeType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RenderQueueRange") != null;
|
|
HasRendererSortModeType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RendererSortMode") != null;
|
|
HasFilteringSettingsType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.FilteringSettings") != null;
|
|
HasSortingSettingsType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.SortingSettings") != null;
|
|
HasRendererListDescType =
|
|
contextType.Assembly.GetType(
|
|
"XCEngine.Rendering.RendererListDesc") != null;
|
|
HasCommandBufferType =
|
|
commandBufferType != null;
|
|
HasProfilingSamplerType =
|
|
profilingSamplerType != null;
|
|
HasScriptableRenderPassInputType =
|
|
renderPassInputType != null;
|
|
HasRenderPassInputProperty =
|
|
renderPassType.GetProperty(
|
|
"input",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderPassConfigureInput =
|
|
renderPassType.GetMethod(
|
|
"ConfigureInput",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(ScriptableRenderPassInput)
|
|
},
|
|
null) != null;
|
|
HasRenderPassRequiresIntermediateTexture =
|
|
renderPassType.GetProperty(
|
|
"requiresIntermediateTexture",
|
|
PublicInstanceMethodFlags) != null;
|
|
HasRenderPassProfilingSampler =
|
|
renderPassType.GetProperty(
|
|
"profilingSampler",
|
|
BindingFlags.Instance |
|
|
BindingFlags.NonPublic) != null;
|
|
HasRenderPassExecute =
|
|
renderPassType.GetMethod(
|
|
"Execute",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(ScriptableRenderContext),
|
|
typeof(RenderingData).MakeByRefType()
|
|
},
|
|
null) != null;
|
|
HasRenderPassOnCameraSetup =
|
|
renderPassType.GetMethod(
|
|
"OnCameraSetup",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(CommandBuffer),
|
|
typeof(RenderingData).MakeByRefType()
|
|
},
|
|
null) != null;
|
|
HasRenderPassOnCameraCleanup =
|
|
renderPassType.GetMethod(
|
|
"OnCameraCleanup",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(CommandBuffer)
|
|
},
|
|
null) != null;
|
|
HasRenderPassOnFinishCameraStackRendering =
|
|
renderPassType.GetMethod(
|
|
"OnFinishCameraStackRendering",
|
|
PublicInstanceMethodFlags,
|
|
null,
|
|
new System.Type[]
|
|
{
|
|
typeof(CommandBuffer)
|
|
},
|
|
null) != null;
|
|
HasRenderPassComparisonOperators =
|
|
renderPassType.GetMethod(
|
|
"op_GreaterThan",
|
|
BindingFlags.Static |
|
|
BindingFlags.Public) != null &&
|
|
renderPassType.GetMethod(
|
|
"op_LessThan",
|
|
BindingFlags.Static |
|
|
BindingFlags.Public) != null;
|
|
HasRenderPassEventUnityNumericOrder =
|
|
(int)RenderPassEvent.BeforeRendering == 0 &&
|
|
(int)RenderPassEvent.BeforeRenderingShadows == 50 &&
|
|
(int)RenderPassEvent.AfterRenderingShadows == 100 &&
|
|
(int)RenderPassEvent.BeforeRenderingPrePasses == 150 &&
|
|
(int)RenderPassEvent.AfterRenderingPrePasses == 200 &&
|
|
(int)RenderPassEvent.BeforeRenderingGbuffer == 210 &&
|
|
(int)RenderPassEvent.AfterRenderingGbuffer == 220 &&
|
|
(int)RenderPassEvent.BeforeRenderingDeferredLights == 230 &&
|
|
(int)RenderPassEvent.AfterRenderingDeferredLights == 240 &&
|
|
(int)RenderPassEvent.BeforeRenderingOpaques == 250 &&
|
|
(int)RenderPassEvent.AfterRenderingOpaques == 300 &&
|
|
(int)RenderPassEvent.BeforeRenderingSkybox == 350 &&
|
|
(int)RenderPassEvent.AfterRenderingSkybox == 400 &&
|
|
(int)RenderPassEvent.BeforeRenderingTransparents == 450 &&
|
|
(int)RenderPassEvent.AfterRenderingTransparents == 500 &&
|
|
(int)RenderPassEvent.BeforeRenderingPostProcessing == 550 &&
|
|
(int)RenderPassEvent.AfterRenderingPostProcessing == 600 &&
|
|
(int)RenderPassEvent.AfterRendering == 1000;
|
|
HasRenderPassEventEngineExtensionOrder =
|
|
(int)RenderPassEvent.BeforeRenderingOpaques <
|
|
(int)RenderPassEvent.RenderOpaques &&
|
|
(int)RenderPassEvent.RenderOpaques <
|
|
(int)RenderPassEvent.AfterRenderingOpaques &&
|
|
(int)RenderPassEvent.BeforeRenderingSkybox <
|
|
(int)RenderPassEvent.RenderSkybox &&
|
|
(int)RenderPassEvent.RenderSkybox <
|
|
(int)RenderPassEvent.AfterRenderingSkybox &&
|
|
(int)RenderPassEvent.BeforeRenderingTransparents <
|
|
(int)RenderPassEvent.RenderTransparents &&
|
|
(int)RenderPassEvent.RenderTransparents <
|
|
(int)RenderPassEvent.AfterRenderingTransparents &&
|
|
(int)RenderPassEvent.AfterRenderingPostProcessing <
|
|
(int)RenderPassEvent.BeforeRenderingFinalOutput &&
|
|
(int)RenderPassEvent.BeforeRenderingFinalOutput <
|
|
(int)RenderPassEvent.AfterRendering &&
|
|
(int)RenderPassEvent.AfterRendering <
|
|
(int)RenderPassEvent.AfterRenderingFinalOutput;
|
|
}
|
|
}
|
|
}
|