浏览代码

fix forward-compatibility of NormalBufferBlurPass (2021.2+, tested against 2021.2.0b6)

/main
Lasse Jon Fuglsang Pedersen 3 年前
当前提交
e241c324
共有 1 个文件被更改,包括 18 次插入2 次删除
  1. 20
      Runtime/CustomPass/NormalBufferBlurPass.cs

20
Runtime/CustomPass/NormalBufferBlurPass.cs


using UnityEngine.Profiling;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;
#if UNITY_2021_2_OR_NEWER
using UnityEngine.Rendering.RendererUtils;
#else
#endif
#if UNITY_2020_2_OR_NEWER
using UnityEngine.Experimental.Rendering.RenderGraphModule;
#endif

RenderTargetIdentifier[] dbufferNormalMaskRTIDs;
#if UNITY_2020_2_OR_NEWER
#if !UNITY_2021_2_OR_NEWER
#endif
#if !UNITY_2021_2_OR_NEWER
#endif
{
if (cachedField_m_DBufferOutput_mrt != null && cachedValue_m_DBufferOutput != null)
{

}
}
#endif
void FindDBufferNormalMaskRTIDs(HDRenderPipeline hdPipeline)
{
dbufferNormalMaskRTIDs = null;

#if !UNITY_2021_2_OR_NEWER
#endif
{
var field_m_DBufferOutput = typeof(HDRenderPipeline).GetField("m_DBufferOutput", BindingFlags.NonPublic | BindingFlags.Instance);
if (field_m_DBufferOutput != null)

{
dbufferNormalMaskRTIDs = new RenderTargetIdentifier[2];
#if !UNITY_2021_2_OR_NEWER
#endif
cachedField_m_DBufferOutput_mrt = field_mrt;
cachedValue_m_DBufferOutput = value_m_DBufferOutput;

}
#endif
#if !UNITY_2021_2_OR_NEWER
var field_m_DbufferManager = typeof(HDRenderPipeline).GetField("m_DbufferManager", BindingFlags.NonPublic | BindingFlags.Instance);
if (field_m_DbufferManager != null)
{

}
}
}
#endif
}
static bool EnsureMaterial(ref Material material, string shaderName)

excludeObjectMotionVectors = false,
};
#if UNITY_2020_2_OR_NEWER
#if UNITY_2021_2_OR_NEWER
CoreUtils.DrawRendererList(renderContext, cmd, renderContext.CreateRendererList(renderListDesc));
#elif UNITY_2020_2_OR_NEWER
CoreUtils.DrawRendererList(renderContext, cmd, RendererList.Create(renderListDesc));
#else
HDUtils.DrawRendererList(renderContext, cmd, RendererList.Create(renderListDesc));

正在加载...
取消
保存