浏览代码

HDRenderPipeline: Fix small issue with Assert trigger when it shouldn't

/RenderPassXR_Sandbox
Sebastien Lagarde 8 年前
当前提交
0c9cfa60
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 4
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs
  2. 5
      Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

4
Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs


if (!isDebugViewMaterialInit)
{
List<RenderPipelineMaterial> materialList = Utilities.GetRenderPipelineMaterialList();
RenderPipelineMaterial deferredMaterial = null;
// TODO: Share this code to retrieve deferred material with HDRenderPipeline
// Find first material that have non 0 Gbuffer count and assign it as deferredMaterial

if (material.GetMaterialGBufferCount() > 0)
{
deferredMaterial = material;
Debug.Assert(deferredMaterial != null);
Debug.Assert(bsdfDataDeferredType != null);
List<MaterialItem> materialItems = new List<MaterialItem>();

5
Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


// Scan material list and assign it
m_MaterialList = Utilities.GetRenderPipelineMaterialList();
// Find first material that have non 0 Gbuffer count and assign it as deferredMaterial
m_DeferredMaterial = null;
foreach (RenderPipelineMaterial material in m_MaterialList)
{
if (material.GetMaterialGBufferCount() > 0)

}
// TODO: Handle the case of no Gbuffer material
Debug.Assert(m_DeferredMaterial != null);
// TODO: I comment the assert here because m_DeferredMaterial for whatever reasons contain the correct class but with a "null" in the name instead of the real name and then trigger the assert
// whereas it work. Don't know what is hapening, DebugDisplay use the same code and name is correct there.
// Debug.Assert(m_DeferredMaterial != null);
m_CameraColorBuffer = Shader.PropertyToID("_CameraColorTexture");
m_CameraSubsurfaceBuffer = Shader.PropertyToID("_CameraSubsurfaceTexture");

正在加载...
取消
保存