#How do I set up Unity so that NSight can show me the name of the shaders?
1 messages · Page 1 of 1 (latest)
Hey! it should be possible when debug symbols are enabled (#pragma enable_d3d11_debug_symbols included in the shader). Unfortunately we currently lack a way to automatically add those to all shaders, but are looking into it.
For the second warning, seems like NSight indicates that DXBC shaderes are not supported fully. So you will need to compile shaders with DXC (#pragma use_dxc) instead of FXC
For simply the shader names, you could also look at the created PSOs (who's name would often be derived from shaders). But ofc it does not solve your problem of deeper shader profiling
Thanks @true hill Is there a way to enable dxc globally by any chance?
Also is there a way to enable_d3d11_debug_symbols for hdrp/urp shaders like hdrp/lit? I'm guessing I'd have to move the package to the assets folder
At the moment there is no official project-wide setting to compile with DXC, or to add the debug symbols 😦 For DXC, some shaders may not be compatible with DXC, and we are looking to improve support.
You could try to "hack" this with the SRP config file, but be warned as we did not test this and it is not recommended. Not sure if it will include shader files using "include with pragmas". So may not work all
So you will likely need to modify the shaders as you suggested
Looking at it a bit more, seems like you will also need to setup an envrionment variable UNITYSHADERCACHE to write out the PDBs to a cache
You can look at example reference here https://support.unity.com/hc/en-us/articles/360044824951-I-need-to-start-Unity-with-an-environment-variable-s-set-how-can-I-do-that
Is there documentation for UNITYSHADERCACHE? I can't find any documentation for it