public override void SetupCullingParameters(ref ScriptableCullingParameters cullingParameters, ref CameraData cameraData)
        {
            ShadowTextureRenderer shadowTextureRenderer = cameraData.camera.GetComponent <ShadowTextureRenderer>();

            if (shadowTextureRenderer == null)
            {
#if UNITY_EDITOR
                Debug.LogWarning("No ShadowTextureRenderer found.");
#endif
                return;
            }
            shadowTextureRenderer.UpdateVisibilityAndPrepareRendering();
            cullingParameters.cullingMask = 0;
            if (shadowTextureRenderer.isProjectorVisible)
            {
                DrawSceneObject drawScene = cameraData.camera.GetComponent <DrawSceneObject>();
                if (drawScene != null)
                {
                    cullingParameters.cullingMask = (uint)drawScene.cullingMask.value;
                }
                DrawTargetObject drawTarget = shadowTextureRenderer.GetComponent <DrawTargetObject>();
                if (drawTarget != null)
                {
                    drawTarget.SendMessage("OnPreCull");
                }
                shadowTextureRenderer.ConfigureRenderTarget(m_renderShadowTexturePass, ref cameraData);
            }
            cullingParameters.cullingOptions = CullingOptions.None;
            cullingParameters.shadowDistance = 0;
        }
 public override void Configure(CommandBuffer cmd, RenderTextureDescriptor cameraTextureDescriptor)
 {
     if (m_rendered)
     {
         // in case of multipass VR, render pass will be called twice even if renderPassEvent == RenderPassEvent.BeforeRendering...
         return;
     }
     m_renderer.ConfigureRenderTarget(this);
 }