TL;DR: I assume since we're able to override material settings using XML files, then it must be possible to alter the material settings before DFU initiates. However, even if the heightmap value is set to its minimum, there will likely be no increase in performance, so you're probably right.
Said that, i suggest that what you're trying to achieve is not trivial and the optimal and most performant way would be to release two separate versions of the mod.
I didn't want to say no until I've tried (and probably failed). What I was going to try to do is use a boolean enableHeight
in the menu, and if the boolean is false, then it will either set the heightmap value to 0.005 or set the heightmap texture to some tiny 4x4 black texture. The obvious drawback is that the shader will still do calculations on the heightmap so there is no appreciable performance advantage, if any at all. I believe if I were to try to set the heightmap texture to null (if I even can), it would not behave like a material whose heightmap was not initially set since all the shader variants have already been compiled. Basically, I think it would have the same outcome as setting the height value to its min value, but I don't know that for sure; it might just throw an error instead.
As an alternative, I was thinking that I could use scaling factors for the smoothness, normals, and heightmaps so users could amplify or diminish these effects. The drawback there is that it will apply to all the materials with no ability to fine tune them individually, although I guess an .xml file for each material in the StreamingAssets/Textures folder would work if the user really
wanted to fine tune the settings. Also, if the scaling factor is set to 0, then it will essentially mute the effect entirely, but again without any performance advantage.
And all this is predicated on the assumption that I can read the materials contained in the .DFMOD file and isolate my edits to only those materials, AND that these edits persist only for one session. That is to say, the next time you run DFU, it pulls in the default values for each material from the .DFMOD file. If I can't programmatically read the contents of the .DFMOD, then I would have to read from some other file that contains all the materials in the scope of the mod, which means I would have to manually populate that file, which means I'm not fooling with it.
So in summary: you're almost definitely right. It would be much simpler to have two separate mods, but I'm an engineer and I just can't help myself from tinkering!
Edit: The first time I tried your link, it didn't work (I was viewing on my phone). I'll look it over. Thanks!