|
|
|
|
|
|
// TODO: Move these to separate passes
|
|
|
|
if (cameraData.postProcessEnabled) |
|
|
|
PostProcessPass(ref context, ref cameraData); |
|
|
|
|
|
|
|
// No blit to backbuffer if camera is offscreen render.
|
|
|
|
if (!cameraData.isOffscreenRender && !cameraData.postProcessEnabled && colorAttachmentHandle != -1) |
|
|
|
else if (!cameraData.isOffscreenRender && colorAttachmentHandle != -1) |
|
|
|
FinalBlitPass(ref context, ref cameraData); |
|
|
|
|
|
|
|
if (cameraData.isStereoEnabled) |
|
|
|
|
|
|
|
|
|
|
CommandBuffer cmd = CommandBufferPool.Get("Final Blit Pass"); |
|
|
|
cmd.SetGlobalTexture("_BlitTex", sourceRT); |
|
|
|
|
|
|
|
if (cameraData.isStereoEnabled || cameraData.isDefaultViewport) |
|
|
|
{ |
|
|
|
cmd.Blit(GetSurface(colorAttachmentHandle), BuiltinRenderTextureType.CameraTarget, material); |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
if (!cameraData.isDefaultViewport) |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
cmd.Blit(GetSurface(colorAttachmentHandle), BuiltinRenderTextureType.CameraTarget, material); |
|
|
|
} |
|
|
|
|
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|