浏览代码

API validation improvement

/tag-1.1.4-preview
sebastienlagarde 7 年前
当前提交
e09e361e
共有 1 个文件被更改,包括 25 次插入8 次删除
  1. 33
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs

33
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


RTHandle m_DebugColorPickerBuffer;
RTHandle m_DebugFullScreenTempBuffer;
bool m_FullScreenDebugPushed;
bool m_NoRendering; // False by default mean we render normally, true mean we don't render anything
bool m_ValidAPI; // False by default mean we render normally, true mean we don't render anything
public Material GetBlitMaterial() { return m_Blit; }

{
SetRenderingFeatures();
m_ValidAPI = true;
if (!SetRenderingFeatures())
{
m_ValidAPI = false;
return ;
}
m_Asset = asset;
m_GPUCopy = new GPUCopy(asset.renderPipelineResources.copyChannelCS);

}
void SetRenderingFeatures()
bool SetRenderingFeatures()
{
// Set subshader pipeline tag
Shader.globalRenderPipeline = "HDRenderPipeline";

#endif
m_NoRendering = false;
m_NoRendering = true;
#if UNITY_EDITOR
foreach (UnityEditor.SceneView sv in Resources.FindObjectsOfTypeAll(typeof(UnityEditor.SceneView)))
sv.ShowNotification(new GUIContent("Platform " + SystemInfo.operatingSystem + " with device " + SystemInfo.graphicsDeviceType.ToString() + " is not supported, no rendering will occur"));
#endif
return false;
return true;
}
bool IsSupportedPlatform()

public override void Dispose()
{
UnsetRenderingFeatures();
if (!m_ValidAPI)
return ;
base.Dispose();
m_DebugDisplaySettings.UnregisterDebug();

m_IBLFilterGGX.Cleanup();
DestroyRenderTextures();
UnsetRenderingFeatures();
#if UNITY_EDITOR
SceneViewDrawMode.ResetDrawMode();

ReflectionProbeCullResults m_ReflectionProbeCullResults;
public override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
{
if (m_NoRendering)
if (!m_ValidAPI)
return;
base.Render(renderContext, cameras);

正在加载...
取消
保存