def create_render_buffer(self, size_x, size_y, depth_bits):
        """
        Boilerplate code to create a render buffer producing only a depth texture
        Args:
            size_x: Render buffer size x
            size_y: Render buffer size y
            depth_bits: bit for Depth test
            depth_tex: Deprecated

        Returns: FrameBuffer for rendering into

        """
        window_props = WindowProperties.size(size_x, size_y)
        buffer_props = FrameBufferProperties()

        buffer_props.set_rgba_bits(0, 0, 0, 0)
        buffer_props.set_accum_bits(0)
        buffer_props.set_stencil_bits(0)
        buffer_props.set_back_buffers(0)
        buffer_props.set_coverage_samples(0)
        buffer_props.set_depth_bits(depth_bits)

        if depth_bits == 32:
            buffer_props.set_float_depth(True)

        buffer_props.set_force_hardware(True)
        buffer_props.set_multisamples(0)
        buffer_props.set_srgb_color(False)
        buffer_props.set_stereo(False)
        buffer_props.set_stencil_bits(0)

        buffer = self.engine.graphics_engine.make_output(
            self.engine.win.get_pipe(), "pssm_buffer", 1, buffer_props, window_props, GraphicsPipe.BF_refuse_window,
            self.engine.win.gsg, self.engine.win
        )

        if buffer is None:
            print("Failed to create buffer")
            return

        buffer.add_render_texture(self.depth_tex, GraphicsOutput.RTM_bind_or_copy, GraphicsOutput.RTP_depth)

        buffer.set_sort(-1001)
        buffer.disable_clears()
        buffer.get_display_region(0).disable_clears()
        buffer.get_overlay_display_region().disable_clears()
        buffer.get_overlay_display_region().set_active(False)

        return buffer

        Boilerplate code to create a render buffer producing only a depth texture
        Args:
            size_x: Render buffer size x
            size_y: Render buffer size y
            depth_bits: bit for Depth test
            depth_tex: Deprecated

        Returns: FrameBuffer for rendering into

        
metadrive/engine/core/pssm.py