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