Shapes drawn in the AfterPostProcess step are cut off if HDRP dynamic resolution scaling is in use
If I draw something in immediate mode in the AfterPostProcess step and I'm using HDRP's dynamic resolution scaling, the resulting shapes will be clipped to the bottom corner of the screen. If the scale is at 50%, for example, then only the bottom left quadrant of the screen gets anything rendered to it.
There should be a small solid hexagon on the floor. The center of the viewport is near the top right corner of this image; note how the small hexagon's right side has been cut off there.
I originally figured this was a Unity bug, since I'd seen similar behavior from other custom passes run in that step. This Unity forum thread describes some of the issues, although I think the bug described in the OP got fixed a while ago. Note how I got varying forms of the problem in this post: one shader was clipped and scaled, whilst another was only scaled. Neither were only clipped!
This makes me wonder if the bug is in the shader or how the Shapes custom passes work, rather than being a Unity bug.
Also, since it's a bit of a nuisance to set all of this up (it took me an embarrassing number of tries to get dynamic resolution to work in a new project...), I can submit a project demonstrating the bug if desired!
I bumped into this again today. It looks like rendering Shapes in the AfterPostProcess step in general causes this to happen.
This shows two different flavors of the problem. I am using a custom pass volume to draw the Disc in the AfterPostProcess step. The render scale is set to around 60% here.
When the disc is not drawn in the AfterPostProcess step, it appears correctly -- same position, same size, but not cut off and not blocked by the cube.
This is Unity 2023.2.2f1 with Shapes 4.3.1