浏览代码

[fptl] removed multiple Submit() calls

/main
vlad-andreev 8 年前
当前提交
0751ef4a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      Assets/ScriptableRenderLoop/fptl/FptlLighting.cs

6
Assets/ScriptableRenderLoop/fptl/FptlLighting.cs


static void CopyDepthAfterGBuffer(RenderLoop loop)
{
var cmd = new CommandBuffer();
cmd.name = "Copy depth";
cmd.CopyTexture(new RenderTargetIdentifier(kGBufferZ), new RenderTargetIdentifier(kCameraDepthTexture));
loop.ExecuteCommandBuffer(cmd);
cmd.Dispose();

for (int nLight = 0; nLight < activeLights.Length; nLight++)
{
nNumLightsIncludingTooMany++;
if (nNumLightsIncludingTooMany > MAX_LIGHTS)
continue;

cullResults = CullResults.Cull(ref cullingParams, renderLoop);
ExecuteRenderLoop(camera, cullResults, renderLoop);
}
renderLoop.Submit();
}
void FinalPass(RenderLoop loop)

m_skyboxHelper.Draw(loop, camera);
FinalPass(loop);
loop.Submit();
}
void NewFrame()

正在加载...
取消
保存