|
|
|
|
|
|
m_CurrCamera = camera; |
|
|
|
m_IsOffscreenCamera = m_CurrCamera.targetTexture != null && m_CurrCamera.cameraType != CameraType.SceneView; |
|
|
|
|
|
|
|
var cmd = CommandBufferPool.Get(""); |
|
|
|
cmd.BeginSample("LightweightPipeline.Render"); |
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
cmd.Clear(); |
|
|
|
{ |
|
|
|
cmd.EndSample("LightweightPipeline.Render"); |
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
CommandBufferPool.Release(cmd); |
|
|
|
} |
|
|
|
var cmd = CommandBufferPool.Get(""); |
|
|
|
cullingParameters.shadowDistance = Mathf.Min(m_ShadowSettings.maxShadowDistance, |
|
|
|
m_CurrCamera.farClipPlane); |
|
|
|
|
|
|
|
|
|
|
cmd.ReleaseTemporaryRT(CameraRenderTargetID.depth); |
|
|
|
cmd.ReleaseTemporaryRT(CameraRenderTargetID.color); |
|
|
|
cmd.ReleaseTemporaryRT(CameraRenderTargetID.copyColor); |
|
|
|
|
|
|
|
cmd.EndSample("LightweightPipeline.Render"); |
|
|
|
|
|
|
|
|
|
|
|
if (m_ShadowMapRT) |
|
|
|
{ |
|
|
|
RenderTexture.ReleaseTemporary(m_ShadowMapRT); |
|
|
|