In the project I’m working on, I’m simulating light from a window using a decal actor since for performance reasons we’re avoiding using actual light actors. I had to make some changes to the way decals are rendered by the engine, things like using a perspective projection for the decal texture instead of an orthogonal one; The changes I made are fairly simple, mostly in PostProcessDeferredDecals.cpp and DeferredDecal.usf. Now I would like to put these changes into a plugin or some other portable system so I can easily move the new functionality of the decal actors to other project which might not be using the same version of UE4.
The version of UE4 I’m using already has other middleware integrated directly into the engine so I would like minimize, as much as I can, the changes made directly to the engine. After some research, it seems USF shaders are required to be in the Engine/Shader folder which is workable, though I prefer if I could include shaders in a plugin. For the changes in PostProcessDeferredDecals.cpp however, I’m not sure if I can overwrite the engine version with a source file in a different module.
Can anyone confirm if it’s even possible to use a plugin to change how a render pass is processed, and if it is it then how would I begin to do that? If I could just change which USF shader the decal rendering pass uses, that would be perfect.