Extending Standard(variants) shaders for extra params

I have established a process for myself to have additional params which extends functionality of Standard shaders as per custom requirements. I wanted some expert to validate if that’s the valid way or not.

Since standard shader file has multiple pragmas, include files & zero shader code (which resides in cginc files) obvious understanding for me was to modify cginc files.

To have extra variable inside my shader, I usually modify UnityStandardInput.cginc file. So far kind of simple features required were easily added to this file itself i.e. modifying Albedo/Alpha etc. functions.

UnityStandardInput.cginc file is referred in UnityStandardCore.cginc file & UnityStandardCore.cginc file is referred in UnityStandardCoreForward.cginc file. Considering I am only dealing material appearance changes with forward rendering path, these are the least amount of files that I need to modify in order to push my changes. I usually tend to copy the base files from Unity Shader source folder, rename these above 3-4 files & rename their references too as per the new name. Not to forget, I also take StandardShaderGUI file for UI modification.

So far, this process has worked for me. I was wondering if there is more elegant way of appending few extra params to existing unity standard shaders?

Best.

I just use an entire set of own shaders that exists completely beside the Unity shaders. So it’s a complete set of shaders, includes and editor ui components. It allows me to add any parameter I want, but also keeps things organized a little better. In my structure all lighting functions are in CommonLight.cginc and all parallax mapping functions are in CommonHeight.cginc for example. Another advantage is that it can be more easily ported to different versions of Unity, since there is no dependency on the standard includes.

Thanks for the insights. So me selectively making copy & editing is not a bad choice. Still would like to listen from others what different approaches they take to extend the standard shaders.