Rebuilding the shader cache of the simulator helps fix problems suddenly coming up without a proper cause. The reasons explained in my Post 58: Rebuild FSX Shader Cache for FSX. It is applicable to P3D as well.
There are friends asking if it is possible to automate the deletion process right before the running of FSX or P3D, when needed.
Surely it is possible. We can create a batch file called ShaderCleanerFSX.bat for FSX or ShaderCleanerP3D.bat for P3D, for example, using the scripts below.
Or simply click on either image to download both pre-written scripts for FSX and P3D.
the download files are in text format and named
This is done so on purpose to prevent accidental running of the files before the changes made for the correct location of fsx.exe or Prepar3D.exe.
After the changes and savings of the files, rename the files as follows:
ShaderCleanerFSX.bat.txt –> ShaderCleanerFSX.bat
ShaderCleanerP3D.bat.txt –> ShaderCleanerP3D.bat
This will turn them into runnable batch files, which, when needed, will delete the Shader Cache folder right before the loading of the simulator.