|
|
|
|
|
|
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(); |
|
|
|
|
|
|
|
ScriptableCullingParameters cullingParameters; |
|
|
|
if (!CullResults.GetCullingParameters(m_CurrCamera, stereoEnabled, out cullingParameters)) |
|
|
|
continue; |
|
|
|
|
|
|
ForwardPass(visibleLights, frameRenderingConfiguration, ref context, ref lightData, stereoEnabled); |
|
|
|
|
|
|
|
|
|
|
|
var cmd = CommandBufferPool.Get("After Camera Render"); |
|
|
|
cmd.name = "After Camera Render"; |
|
|
|
#if UNITY_EDITOR
|
|
|
|
if (sceneViewCamera) |
|
|
|
CopyTexture(cmd, CameraRenderTargetID.depth, BuiltinRenderTextureType.CameraTarget, m_CopyDepthMaterial, true); |
|
|
|
|
|
|
cmd.ReleaseTemporaryRT(CameraRenderTargetID.depth); |
|
|
|
cmd.ReleaseTemporaryRT(CameraRenderTargetID.color); |
|
|
|
cmd.ReleaseTemporaryRT(CameraRenderTargetID.copyColor); |
|
|
|
|
|
|
|
cmd.EndSample("LightweightPipeline.Render"); |
|
|
|
|
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
CommandBufferPool.Release(cmd); |
|
|
|
|
|
|
|