Debugging clip planes
This is not really an issue but a feature request
And believe there is no way currently to debug clip planes at all in Renderdoc and I haven't found any info online and looking through renderdoc about clipping planes.
I spent the whole day wondering why nothing was rendered in my render target. I noticed that the mesh output displayed meshes properly on screen properly but then looking at the texture viewer, and selecting Wireframe Mesh didn't show anything at all. It took me the whole day before realizing that the vertex shaders were using incorrect clip planes.
Clip planes are not set as a render state, they are passed from the vertex shader to the pixel shader as an input. Which is why it may be tricky to catch.
It would be amazing if there was a way to debug clip planes easily, the same way we can debug face culling for instance. Or even better, visualize the clip plane in the mesh output!
Also, some people use clip planes for instanced rendering in VR, this could be a nice way for them to debug clip planes as well.
Thanks
Yes you're right, this is kind of a small corner of the API that isn't well exposed. You should be able to get the outputs from the vertex shader at least in the mesh output, but there's no built-in visualisation.
I think the problem with visualising the planes themselves is that (AFAIK) none of the APIs actually emit a full plane - instead the vertex shader just emits a distance-to-plane value, which then gets interpolated and clipped. So it should be possible to reverse-engineer the plane as long as you can find three vertices that have different distances to the plane. Not exactly trivial but also not impossible :smile:.
Somewhat useful would be at least adding a shading mode in the VS output similar to the solid shading options there, which colours the mesh red/green according to where it's clipped.