What set of tools do the SRP devs use to write and debug shaders

I have been trying to come up with a robust set of tools for writing and debuging unity shaders for a while. I’m very curious what IDE and extensions the srp devs use. Do you prefer RenderDoc or something else? If you use visual studio what extensions do you use for hlsl support?

Hi!
I believe every developer uses what they find most comfortable and that usually comes with familiarity. I personally (URP team) write shaders in Rider, although I have seen people using VS Code and XCode. For debugging I usually prefer using Unity’s built in Frame Debugger. Very rare occasions I start RenderDoc, but it makes life a lot easier when it comes to scene or editor rendering debugging. XCode’s frame debugger is also quite powerful with their pixel debugging feature. And of course there are number of tools for mobile debugging given by their developers, which these days come as plugins for IDEs rather than standalone apps.

When it comes to plugins and extensions specifically for shaders, Rider has builtin intellisense that helps writing them, you just need to add rider package to Unity through Package Manager. As for the Visual Studio, I have seen some HLSL helping packages available in their marketplaces, have you tried any of those?

Yes form me personally the Unity frame debugger is generally also the first thing I check out as it gives a good view on how Unity itself sees the render state. Often you can catch easy mistakes early there (like say the wrong textures or shader parameters being set). Then going a level deeper RenderDoc is also the first tool I go to.

When doing performance testing or if you need to dig really deep I prefer to use the tools made available by the console platform holders. They are generally remarkably efficient to use even if they are so low level.

Not sure whether official realize that sometimes unity frame debugger will give u incorrect info. :eyes:

As much as I had to work with it, information it has given was correct, and it helped me, and many other developers fix number of bugs. If it’s the case that it sometimes gives incorrect information, that sounds like a serious bug. Maybe you have a reproducible project and/or filled a bug report?

I have but all of them seem to havr quirks that hinder productivity. For example navigate to definition does not seem to work with any of them and that feature I really miss when looking at the built in srp shaders to figure out what is going on and where the functions and macros are coming from.

I noticed that 2023 has an overhauled Frame Debugger. I’m wondering if it will be able to display/debug stencil buffer? Any chance the Frame Debugger will be able to debug the SceneView someday?

If you know how to use vim, ctags does a pretty good job to navigate to definitions, especially in HDRP where we have the same functions defined multiple times for all material types

Hey!
What version of Unity are you using where you see this issue?

That’s very high on my list of features to implement for the Frame Debugger. I can’t promise it will make it in 2023 but will try.

I will give vim a spin then. Can it somehow handle autocomplete too ?

yes, but it has very steep learning curve, you need to take some time to configure it to work efficiently, i prefer to warn beforehand

1 Like

Both SceneView and stencil, or just one of them?

Ahh sorry, wasn’t very clear there. I was referring to the Stencil feature.

The Scene View is quite likely a difficult problem but that’s my assumption, I need to investigate to get a better idea of the work needed to support this.

1 Like