Is it possible to make a 2D "clip plane"?

If I understood correctly, it should be possible to use a clip plane for this; perhaps this post of mine could help.

Another possibility could be to use a ScissorEffect, as in the following code:

from panda3d.core import *
from direct.showbase.ShowBase import ShowBase
from direct.interval.IntervalGlobal import LerpScaleInterval, Sequence


class Panda3DApp(ShowBase):

    def __init__(self):

        ShowBase.__init__(self)
        
        cm = CardMaker("square")
        cm.set_frame(-1., 1., -1., 1.)
        cm.set_has_normals(False)
        square_node = cm.generate()
        square = self.aspect2d.attach_new_node(square_node)
        scissor_controller = self.aspect2d.attach_new_node("scissor_controller")
        square.set_scissor(scissor_controller, Point3(-1., 0., -1.), Point3(1., 0., 1.))

        scale1 = (1., 1., .01)
        lerp_interval1 = LerpScaleInterval(scissor_controller, 1., scale1)
        scale2 = 1.
        lerp_interval2 = LerpScaleInterval(scissor_controller, 1., scale2)
        self.sequence = Sequence(lerp_interval1, lerp_interval2)
        self.sequence.loop()


app = Panda3DApp()
app.run()

Note that I’m not entirely sure if a scissor region is supposed to be controlled like this, but it seems to work.