Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cleaning shaders - should I be doing it?

Featured Replies

Something I've never done in FSX or P3D, just in case I mess up - But is it important every now and again?

Eugene

  • Replies 36
  • Views 8.5k
  • Created
  • Last Reply

Top Posters In This Topic

I usually remove the shaders folder when I've installed a new version of my display driver, but that's it.

^^^^ This

MSFS & XP11 - Aviatek G1000 Complex Desktop Trainer - Fulcrum One Yoke - TPR Rudder Pedals - VF TQ6 Throttle - LG 55" OLED Display

I do it when I change sceneries, display drivers or driver settings. Only one mouse click with "Simstarter".

Regards,

Chris

--

PC: Intel 13900K, Gigabyte Geforce RTX 4090, 64GB Fury Beast DDR5 RAM; Display: Varjo Aero VR

I use the Prepar3D recommended method:
 
 
Tuning Guide
 

[GRAPHICS]
 

SHADER_CACHE_VERSION=1

 

Non-Default entry. This entry will not exist in your Prepar3D.cfg file by default and must be added to the file.
Performance Tuning Tip:
Using this rebuilds your shader cache by incrementing the number each time you make a change to the Prepar3D.cfg.

 


 
Cheers

Ramón.
Time, is the one thing no one can buy.
ovbe94a9nab0bbc6g.jpg

 

  • Moderator

The shader cache version work fine only if you make a change to the cfg file. It does not do anything if you do not change the file.

 

Other than the time it takes to rebuild the shaders, there is no harm in deleting them. Anytime I make any sort of change in P3D, I delete the shaders. Add aircraft, scenery, any graphics driver settings,. NVI changes, etc.

 

Vic

 

RIG#1 - I9 14900K MSI Pro z790 RTX 5070Ti
40" 4K Monitor 3840x2160 

  • Commercial Member

The shaders only need rebuilding after any shader code has changed. So we make a change in the shader code and we delete the shaders and they are remade from the new code when the sim next runs and finds they are missing. The cfg setting saves shader coders the hassle of deleting the shader folder each visit.

Steve Waite: Engineer at codelegend.com

  • Author

Interesting, Thanks.

It's a new P3D 3.1 install, so far I've added FTX Global, SoCal and England, and a couple of Capt Sim retro jets - sounds like I should be re spawning the shaders?

The cfg mod looks like the easiest/safest way for a non techy,

 

  "[GRAPHICS]

SHADER_CACHE_VERSION=1

 

It needs another cfg mod to get it to kick in, but if I did something innocuous like changing VSYNC=1 to VSYNC=0, or vice versa, would that do the trick?

Just to complete my understanding - is this to make it look better, or increase FPS or both?

Thanks

Eugene 

  • Commercial Member

None of. It's for when code in the folder "C:\Program Files (x86)\Lockheed Martin\Prepar3D v3\ShadersHLSL" is changed.

 

The shaders only need rebuilding after any shader code has changed. So we make a change in the shader code and we delete the shaders and they are remade from the new code when the sim next runs and finds they are missing. The cfg setting saves shader coders the hassle of deleting the shader folder each visit.

Steve Waite: Engineer at codelegend.com

Not discussing the "when" but the "how"

 

You can create a bat file this way (replace YOURNAMEHERE with your username)

 

Placed anywhere, it will delete the content of your shader folder in one click.

 

 

del /f /q "C:\Users\YOURNAMEHERE\AppData\Local\Lockheed Martin\Prepar3D v3\Shaders\*.*"

  • Author

None of. It's for when code in the folder "C:\Program Files (x86)\Lockheed Martin\Prepar3D v3\ShadersHLSL" is changed.

 

 

OK,Thanks - How would I know this has happened?

Eugene

I also have set up a batch file which deletes the shaders folder and also starts ASN and P3D, all in a row. The batch file itself is started by the simstarter tool, just had to point to it in simstarter's "start definition". So one cklick does it all. And so my shaders folder gets deleted everytime i start the sim.

 

Simon

Everytime...? Seriously? Isn't that a bit too much? Those shaders are saved for a reason, why would you delete them everytime?! I only delete them whenever I installed new scenery or (totally) change my settings. Doing this everytime is a bit counterproductive. I personally don't want to wait every single time for that black screen to disappear. It also hurts performance in the beginning. Certainly not something I would advice everyone to do.

  • Commercial Member

OK,Thanks - How would I know this has happened?

Eugene

When you get an update from 3.1 to 3.2 look in the files in the .zip, if there are any for \ShadersHLSL, then they changed and you need to delete the old shaders.

Steve Waite: Engineer at codelegend.com

  • Moderator

Those aren't the same shaders Steve. The ones the OP asked about are in:

C:\Users\xxx\AppData\Local\Lockheed Martin\Prepar3D v3\Shaders

 

The shadersHLSL are not rebuilt using the shader_cache_version.

 

The shadersHLSL should NOT be touched unless one really knows what they are doing.

 

Vic

 

RIG#1 - I9 14900K MSI Pro z790 RTX 5070Ti
40" 4K Monitor 3840x2160 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.