Custom shader directory (feature request)

Currently the shader folder is hardcoded to [UEInstall]/Engine/Shaders.

This is really impractical, as:

  • our codebase does not contain the UE codebase, meaning the created shaders won’t get in the version control system unless we put the file in our sources and manually copy it each time
  • immediate consequence: this will need every other dev/artist/whatever to copy that file by hand

Would it be possible that instead of just searching [UEInstall]/Engine/Shaders, the engine would also search in [GameDir]/Shaders first (or something in the like) ? (that way it is possible to override shaders per project).

If I understand correctly it would only need to change LoadShaderSourceFile inside ShaderCore.cpp - I can do that if it helps.

(I would like a dev feedback on this)

I’m completely agree with this feature request, but:

You can use mklink to make your life a bit easier :wink: No manual copy will be required and you’ll be able to use version control systems witout any doubt.

Yes, but I am a developer. It will be way harder for non-devs… Especially since it requires admin priviledges :frowning:

I think I will code this feature, but I don’t know if it is better to put it in master or 4.6 …

I asked this in the twitch feed last week. Basically it’s a very high priority and it’s part of the initiative to get code plugins into the marketplace. Sounds like somewhere past 4.7, so sometime early next year hopefully.

/ Kyle

That could be very interesting ! Does it mean that just the location of shaders will be more configurable, or will the shader pipeline also be easier to modify (ie, no need to change a bazillion files just to get one shader) ?