displayRegions render order

I looked at this page and its a bit confusing: panda3d.org/manual/index.php … ay_Regions
I still cant get 2 display regions to be one on top of another, but have transparency for the background color.
I tried

win.setClearColorActive(True)
win.setClearColor(VBase4(0,0,0,0))

You just set it to black. If you want transparency, you don’t want clearing, so you need to disable it (set it to False instead of True).

Its weird, I tried that, and all the possible combinations of settings because the manual page is a bit confusing, and I cant get what I want

render1 = render.attachNewNode('render1')
dr1 = base.win.makeDisplayRegion(0,1,0,1)
cam1 = render1.attachNewNode(Camera('cam1'))
dr1.setCamera(cam1)
#dr1.setClearColor(VBase4(0,0,0,0))
#dr1.setClearColorActive(False)
#dr1.setClearDepthActive(False)
#dr1.setSort(0)
cam1.node().getLens().setAspectRatio(float(dr1.getPixelWidth()) / float(dr1.getPixelHeight()))

render2 = render.attachNewNode('render2')
dr2 = base.win.makeDisplayRegion(0,1,0,1)
cam2 = render2.attachNewNode(Camera('cam2'))
dr2.setCamera(cam2)
#dr2.setClearColor(VBase4(0,0,0,0))
#dr2.setClearColorActive(False)
#dr2.setClearDepthActive(False)
#dr2.setSort(1)
cam2.node().getLens().setAspectRatio(float(dr2.getPixelWidth()) / float(dr2.getPixelHeight()))

You’ll probably want the back one to have all clears enabled, and the front one to have depth-clear enabled and colour-clear disabled.

That should make the top display region transparent, showing over the contents of the bottom one.

Oh, i get it now. In my real code I actually had a splitscreen effect with 2 display regions like this (0,0.5,0,1) and (0.5,1,0,1) and I wanted them to render over their boundaries. Well, that was stupid.