A question from one of our fans reads as follows:
Is it possible for an end-user/programmer to modify/customize FSX shader code?
There’s a folder ‘ShadersHLSL’ in FSX main folder. I guess the purpose of that source files is for customization, isn’t it?
Can you give some light about this?
I am sure there are other “modders” out there which might be asking the same question.
The official word is that editing shaders is not “officially” supported by our SDK and therefore we cannot make guarantees about future support for changes made to these files.
That being said, I guess the first question to answer is as to why these shader files were left in plain text. This was mostly due to lack of time and we prefered focusing our efforts on other more “worthy” causes than comming up with some cryptic file format to obscur our shaders.
That being said, there are a few things I must mention for those who want to fiddle with our shaders. First of all, take a look at the Common folder. In there you will find several include files which gives you a list of the variables FSX exposes to our shaders. Also keep in mind that there is a certain amount of redundancy in our shader files which stems mostly for the support of 2.0, 1.x and Fixed Pipeline cards.
The second thing, which is crutial to understand if plating around with our shaders is that they are compiled once (as needed) and the result is cached in a user folder. Since changes to shaders was not intended to be directly supported by FSX, any changes made to these files will not be automatically accounted for. Meaning, that you will need to go through and empty the cache manually in order for it to be rebuilt with the modified shaders. The cache files are located in the Windows user folder under \Documents and Settings\[User]\Local Settings\Application Data\Microsoft\FSX\Shaders