renderdoc icon indicating copy to clipboard operation
renderdoc copied to clipboard

VR/Multiview - shader debugging on any slice of the texture

Open WenzhengHuangMeta opened this issue 2 years ago • 1 comments

Description

Hello, I am currently developing contents for VR and I am debugging a graphics bug that only happens on one eye.

When I debug a output texture with multiple slices, I find the shader debugger can only debug pixels on the last slice regardless which slice I choose. _ViewIndex (or SV_ViewID) is always 1. Thus I can only debug the pixel on the right eye, not the left.

Is there any way to debug the first slice (left eye) currently? If no we'd like to request this feature.

Thank you.

Environment

  • RenderDoc version: RenderDoc Meta Fork 55.3 (forked from RenderDoc v1.28) (Qt version 5.9.4)
  • Operating System: Windows 10/Quest 2
  • Graphics API: Vulkan

WenzhengHuangMeta avatar Oct 19 '23 20:10 WenzhengHuangMeta

This problem is similar to #763 where pixel debugging can't disambiguate between two draws that overlap the same pixel without a discriminator. In that case it happens with plain instancing and it's not possible to disambiguate because the instance ID can't be obtained in the pixel shader, but in this case with the view index that can be used as an input so it should be possible to resolve this automatically.

As a workaround you may be able to use the pixel history to pick the particular pixel you're interested in, as it will be able to differentiate based on primitive as long as it's a complex enough mesh that it's not the same primitive touching the same pixel in both eyes. If that doesn't work, the other alternative would be to edit the vertex shader to discard the mesh in one of the eyes temporarily, so you only have the instance you want to debug being rendered.

baldurk avatar Oct 26 '23 10:10 baldurk

Supported in a9caf68c9a4b5efa9d3b6eb82ccc1e13d311bd63

Zorro666 avatar Mar 13 '24 08:03 Zorro666

Thank you soooo much!

WenzhengHuangMeta avatar Apr 27 '24 00:04 WenzhengHuangMeta