CullResults m_CullResults ;
List < int > m_LocalLightIndices = new List < int > ( ) ;
bool m_IsCameraRendering ;
public LightweightPipeline ( LightweightPipelineAsset asset )
{
pipelineAsset = asset ;
QualitySettings . antiAliasing = pipelineAsset . MsaaSampleCount ;
Shader . globalRenderPipeline = "LightweightPipeline" ;
m_IsCameraRendering = false ;
}
public override void Dispose ( )
public override void Render ( ScriptableRenderContext context , Camera [ ] cameras )
{
if ( m_IsCameraRendering )
{
Debug . LogWarning ( "Nested camera rendering is forbidden. If you are calling camera.Render inside OnWillRenderObject callback, use BeginCameraRender callback instead." ) ;
return ;
}
base . Render ( context , cameras ) ;
BeginFrameRendering ( cameras ) ;
// Sort cameras array by camera depth
Array . Sort ( cameras , m_CameraComparer ) ;
BeginCameraRendering ( camera ) ;
m_IsCameraRendering = true ;
BeginCameraRendering ( camera ) ;
ScriptableCullingParameters cullingParameters ;
if ( ! CullResults . GetCullingParameters ( camera , cameraData . isStereoEnabled , out cullingParameters ) )
continue ;
m_Renderer . Setup ( ref context , ref m_CullResults , ref renderingData ) ;
m_Renderer . Execute ( ref context , ref m_CullResults , ref renderingData ) ;
context . Submit ( ) ;
m_IsCameraRendering = false ;
}
void InitializeCameraData ( Camera camera , out CameraData cameraData )