|
|
|
|
|
|
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)); |
|
|
|