Any chance of having Nsight to work with ue4 compiler worker?

After a couple of tries I realized that it is most likely not easy to get HLSL in Nsight. I succeeded at getting some sort of HLSL code in Nsight but there are all referencing to a big shader that contains all the includes. Their name are mostly Main and their referenced line doesn’t fits (they fits if you go on the drive and find the corresponding usf shader.

But the major problem is that debugging is not available. I have a doupt that Nsight is not aware that ue4 is using a worker. The only help founded on the net are coming from an unreal dev guy:

[i]"I haven’t tried source in Nsight for a while, but some things you can try:

  • Remove the call to D3DStripShader in D3D11ShaderCompiler.cpp. You have to recompile ShaderCompileWorker Win64 Development to propagate the change. And then add a space or something to common.usf to force shaders to recompile (if you are working on a global shader just edit it a bit).
  • In UE4 we compile the shaders in a different app (ShaderCompileWorker) which allows making use of all your cores. However tools like NSight don’t know about this other app and they only hook the compile calls in the main executable. If you open BaseEngine.ini and set bAllowCompilingThroughWorkers=False, any future shaders will be compiled from the main executable. Of course, this will make compiling super slow."[/i]

https://forums.unrealengine.com/showthread.php?6719-Debugging-USF-(Unreal-Shader-Files)

Since Unreal is one of the most used game engine in the wrold, I think some guile line should be provided by Nsight developper (epic might not put lots of effort since renderdoc is working actually).

Hi,

as I mentioned in another post, Nsight don’t support Shader Debug on Maxwell GPU now, we are working on it of course, but you can try to use Kepler/Fermi GPU for Shader Debug.

Thanks
An

Thanks for the enlighten me on this! I’ll have to test again with my Titan. But I have a doubt that the line referencing and the HLSL shader will not be in a better shape, I’ll have to dig at the right procedure to get shader in Nsight in a proper way, there is no doc about it and a very few people managed to get it to work properly.

I’m going to the GDC this week, any chance I get speak to a Nsight dev guy?

Hi,

UE4 should work fine with Nsight, there will be some guy attend GDC, but I’m not sure how you can find them, maybe ask around Nvidia booth?

Thanks
An