renderdoc icon indicating copy to clipboard operation
renderdoc copied to clipboard

Suggestion: Make a stackable overlay menu

Open redorav opened this issue 6 years ago • 3 comments

Hi,

I find myself trying to stack some of the overlays like the Highlight Drawcall and Depth Test with the Viewport/Scissor Rect to see which pixels actually pass these conditions, or trying to see the Wireframe Mesh as well as the Stencil Test or something of the sort, basically combining some of the overlays. Currently I need to be toggling them and roughly remembering which pixels satisfy what condition of a previous overlay. Is there a case for stacking them together in some fashion? I can see value in saying "which pixels pass the stencil, and depth, and are within the viewport, and haven't been culled" all in a single image. What do you think?

redorav avatar Sep 01 '17 11:09 redorav

I think trying to make some system that lets you combine an arbitrary set of overlays together would be kind of clumsy to use compared to a simple drop-down, and not super easy to implement (although still feasible).

I'm having a hard time understanding exactly what you want and what combinations would actually be useful. Do you just want a new overlay that is green/red for "all tests passed / any test failed" ? i.e. a collective pass/fail?

baldurk avatar Sep 01 '17 21:09 baldurk

To put in a bit of context, the situation I was in was trying to determine was what pixels in a deferred lighting shader were actually being shaded, and I was considering variables like the pixel coverage by the geometry, the scissor rectangle, the stencil test, the depth test and the backface cull, all at the same time. I think this

Do you just want a new overlay that is green/red for "all tests passed / any test failed" ? i.e. a collective pass/fail?

is one of the uses. So a view where I can say how many tests I want to pass, and green where they all pass, red where some fail.

One thing I notice is that the overlays are a bit of a mishmash of different functionality. I can see Wireframe Mesh and Scissor/Viewport as being stackable on top of everything else, for instance, but I can also see how some of the overlays can't be stacked together. I don't know if this clears it up or makes it more confusing.

redorav avatar Sep 05 '17 09:09 redorav

I sort of get what you mean but I'm still not entirely convinced on the suggested solution. I can add a "pixels shaded" overlay as I described, but more complex arbitrary combinations I'm not so sure if it's the right way to go.

One idea I had was maybe to simply add a tooltip to that overlay where if you hovered over a failed pixel it would tell you which tests it had failed. I'd want to try and understand though the use-cases for something like that though, it sounds like in your case the simpler overlay would do the trick.

The intention of the overlays originally was to get you a quick overview to see where an object is or in the case of depth-test/stencil-test primarily to be able to quickly identify why something isn't drawing (by seeing that on a particular test it's all red).

I wonder if something entirely separate is needed if you want complex checks of how a draw performed through different steps. On a pixel-by-pixel basis you get that with the pixel history which shows you what tests a particular fragment failed on, but it sounds like you're wanting to see that over the whole draw (which is not too much more difficult really). It depends on if you want to be able to see the results of the test visualisation at the same time as the resulting texture, or if a separate view/panel would suffice just as well. Maybe a future "draw analysis" panel which shows which pixels passed/failed, why a NaN was produced, identifiying known inefficiencies, etc.

baldurk avatar Sep 05 '17 16:09 baldurk