Debugging USF (Unreal Shader Files)

>With the worker, it takes something like 10 minutes on my computer. So without, it will be long…

Yeah that would be murder

If you are just making usf changes to your VF and not C++ changes, you can setup a simple test level, run it in the editor, then recompile just a single material applied to a single mesh (or whatever your vertex factory is). When you recompile a material in the material editor, it re-reads all the usf files from disk so you can quickly iterate that way.

When you are making a new vertex factory be sure not to just return true from the ShouldCache. That will make it compile the shaders everywhere on every material. Add a usage flag to the material, then artists have to opt-in to using it. Actually the editor will automatically set the flag when possible. Then only those flagged materials will compile your VF, which can cut down the shader combinations needed massively. Have a look at any other vertex factory for a working example (except local VF).

Probably because shaders are cached using a hash of the file contents. If you make a change, recompile, then undo the change, recompile, the second recompile will be very fast (seconds) because the results are already cached in the Derived Data Cache.