浏览代码

Added back the "ref" modifiers to DrawRenderer APIs (needs C++ too)

/Branch_Batching2
Julien Ignace 8 年前
当前提交
81caf93b
共有 4 个文件被更改,包括 8 次插入8 次删除
  1. 4
      Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs
  2. 4
      Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs
  3. 2
      Assets/ScriptableRenderLoop/RenderPasses/ShadowRenderPass.cs
  4. 6
      Assets/ScriptableRenderLoop/fptl/FptlLighting.cs

4
Assets/BasicRenderLoopTutorial/BasicRenderLoop.cs


var settings = new DrawRendererSettings(cull, camera, new ShaderPassName("BasicPass"));
settings.sorting.flags = SortFlags.CommonOpaque;
settings.inputFilter.SetQueuesOpaque();
context.DrawRenderers(settings);
context.DrawRenderers(ref settings);
// Draw skybox
context.DrawSkybox(camera);

settings.inputFilter.SetQueuesTransparent();
context.DrawRenderers(settings);
context.DrawRenderers(ref settings);
context.Submit();
}

4
Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs


sorting = { flags = SortFlags.CommonOpaque }
};
settings.inputFilter.SetQueuesOpaque();
renderContext.DrawRenderers(settings);
renderContext.DrawRenderers(ref settings);
}
void RenderTransparentRenderList(CullResults cull, Camera camera, ScriptableRenderContext renderContext, string passName, RendererConfiguration rendererConfiguration = 0)

sorting = { flags = SortFlags.CommonTransparent }
};
settings.inputFilter.SetQueuesTransparent();
renderContext.DrawRenderers(settings);
renderContext.DrawRenderers(ref settings);
}
void RenderDepthPrepass(CullResults cull, Camera camera, ScriptableRenderContext renderContext)

2
Assets/ScriptableRenderLoop/RenderPasses/ShadowRenderPass.cs


commandBuffer.Dispose();
// Render
loop.DrawShadows(settings);
loop.DrawShadows(ref settings);
}
}
}

6
Assets/ScriptableRenderLoop/fptl/FptlLighting.cs


//@TODO: need to get light probes + LPPV too?
settings.inputFilter.SetQueuesOpaque();
settings.rendererConfiguration = RendererConfiguration.PerObjectLightmaps | RendererConfiguration.PerObjectLightProbe;
loop.DrawRenderers(settings);
loop.DrawRenderers(ref settings);
}
void RenderForward(CullResults cull, Camera camera, ScriptableRenderContext loop, bool opaquesOnly)

if (opaquesOnly) settings.inputFilter.SetQueuesOpaque();
else settings.inputFilter.SetQueuesTransparent();
loop.DrawRenderers(settings);
loop.DrawRenderers(ref settings);
}
static void DepthOnlyForForwardOpaques(CullResults cull, Camera camera, ScriptableRenderContext loop)

sorting = { flags = SortFlags.CommonOpaque }
};
settings.inputFilter.SetQueuesOpaque();
loop.DrawRenderers(settings);
loop.DrawRenderers(ref settings);
}
bool usingFptl

正在加载...
取消
保存