I often encounter such a demand: I hope to be able to quickly do some rendering-related experiments in Unreal Engine, but if I need to modify the engine source code and compile every time, it will make my work very complicated. Moreover, this also makes it difficult for me to share my achievements with others.
In the era of UE4, it is almost inevitable to insert your own rendering code and compile the source code of the engine. But in UE5, the rendering code of Unreal Engine has become flexible enough to make me want to try whether I can achieve the goal of "rendering certain meshes in the scene with my own Shader" without modifying the official source code of Unreal, through plugins.
<aside> ℹ️ The source code is on the Github: https://github.com/ldl19691031/AddMeshPassPlugin
</aside>
<aside> ⚠️ Warning before reading: The method written in this article has only been used by me for prototype development, and I have never used the above method in a production environment. If you wish to significantly modify the rendering code, please be sure to contact the Epic development team. Please note: My purpose is to illustrate "it can be done this way", but it is not to illustrate "you should do it this way".
</aside>
Instead of working in the project’s source folder, I usually choose to create an individual plugin.
First you should create a new plugin, the simplest way is open Plugins menu