def _setup_inputs(self):
        """ Creates commonly used shader inputs such as the current mvp and
        registers them to the stage manager so they can be used for rendering """

        self._input_ubo = GroupedInputBlock("MainSceneData")
        inputs = (
            ("camera_pos", "vec3"),
            ("view_proj_mat_no_jitter", "mat4"),
            ("last_view_proj_mat_no_jitter", "mat4"),
            ("last_inv_view_proj_mat_no_jitter", "mat4"),
            ("view_mat_z_up", "mat4"),
            ("proj_mat", "mat4"),
            ("inv_proj_mat", "mat4"),
            ("view_mat_billboard", "mat4"),
            ("frame_delta", "float"),
            ("smooth_frame_delta", "float"),
            ("frame_time", "float"),
            ("current_film_offset", "vec2"),
            ("frame_index", "int"),
            ("screen_size", "ivec2"),
            ("native_screen_size", "ivec2"),
            ("lc_tile_count", "ivec2"),
            ("ws_frustum_directions", "mat4"),
            ("vs_frustum_directions", "mat4"),
        )
        for name, ipt_type in inputs:
            self._input_ubo.register_pta(name, ipt_type)

        self._pipeline.stage_mgr.input_blocks.append(self._input_ubo)

        # Main camera and main render have to be regular inputs, since they are
        # used in the shaders by that name.
        self._pipeline.stage_mgr.inputs["mainCam"] = self._showbase.cam
        self._pipeline.stage_mgr.inputs["mainRender"] = self._showbase.render

        # Set the correct frame rate interval
        Globals.clock.set_average_frame_rate_interval(3.0)

        # Set initial value for view_proj_mat_no_jitter
        view_mat = Globals.render.get_transform(self._showbase.cam).get_mat()
        proj_mat = Mat4(self._showbase.camLens.get_projection_mat())
        proj_mat.set_cell(1, 0, 0.0)
        proj_mat.set_cell(1, 1, 0.0)
        self._input_ubo.update_input("view_proj_mat_no_jitter", view_mat * proj_mat)
 Creates commonly used shader inputs such as the current mvp and
        registers them to the stage manager so they can be used for rendering 
metadrive/render_pipeline/rpcore/common_resources.py