class_docstr: Abstract base class for Visual-specific filters to implement a
  primitive-picking mode.
  
  Subclasses must (and usually only need to) implement
  :py:meth:`_get_picking_ids`.
class_docstr_tok: ["Abstract","base","class","for","Visual-specific","filters","to","implement","a","primitive-picking","mode",".","Subclasses","must","(","and","usually","only","need","to",")","implement",":","py",":","meth",":","`","_get_picking_ids","`","."]
code: def __init__(self, fpos=9, *, discard_transparent=False):
      # fpos is set to 9 by default to put it near the end, but before the
      # default PickingFilter
      vfunc = Function(
          """\
              varying vec4 v_marker_picking_color;
              void prepare_marker_picking() {
                  v_marker_picking_color = $ids;
              }
          """
      )
      ffunc = Function(
          """\
              varying vec4 v_marker_picking_color;
              void marker_picking_filter() {
                  if ( $enabled != 1 ) {
                      return;
                  }
                  if ( $discard_transparent == 1 && gl_FragColor.a == 0.0 ) {
                      discard;
                  }
                  gl_FragColor = v_marker_picking_color;
              }
          """
      )
  
      self._id_colors = VertexBuffer(np.zeros((0, 4), dtype=np.float32))
      vfunc["ids"] = self._id_colors
      self._n_primitives = 0
      super().__init__(vcode=vfunc, fcode=ffunc, fpos=fpos)
      self.enabled = False
      self.discard_transparent = discard_transparent
  
imports: from abc import ABCMeta, abstractmethod
  import numpy
  from vispy.gloo import VertexBuffer
  from ..shaders import Function
label_desc: Use image node_id 1 to create a new PrimitivePickingFilter object from inherited base classes: Filter with example: obj = PrimitivePickingFilter(fpos)