|
|
|
|
|
|
|
|
|
|
// If rendering to an intermediate RT we resolve viewport on blit due to offset not being supported
|
|
|
|
// while rendering to a RT.
|
|
|
|
if (colorAttachmentHandle == -1 && cameraData.isDefaultViewport) |
|
|
|
if (colorAttachmentHandle == -1 && !cameraData.isDefaultViewport) |
|
|
|
cmd.SetViewport(camera.pixelRect); |
|
|
|
|
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
|
|
|
CommandBuffer cmd = CommandBufferPool.Get("Final Blit Pass"); |
|
|
|
cmd.SetGlobalTexture("_BlitTex", sourceRT); |
|
|
|
|
|
|
|
if (!cameraData.isDefaultViewport) |
|
|
|
// We need to handle viewport on a RT. We do it by rendering a fullscreen quad + viewport
|
|
|
|
if (colorAttachmentHandle != -1 && !cameraData.isDefaultViewport) |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|