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.