Jump to content

How To Recompile Your Shaders Each Time You Start Mwo


5 replies to this topic

#1 Nightbird

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • The God of Death
  • The God of Death
  • 7,518 posts

Posted 30 June 2022 - 09:46 AM

On your desktop, create a text file and name it MWO.BAT

edit and and copy pasta:

SET shaderpath="your_windows_drive:\Users\user_name\Saved Games\MechWarrior Online\Shaders"
SET gamepath="your_MWO_drive:\Program Files (x86)\Piranha Games\MWO Portal"
rd %shaderpath% /S /Q
your_MWO_drive:
cd %gamepath%
start "" "MWO Portal.exe"
exit



replace your_windows_drive, your_MWO_drive with C, D, etc... and user_name with your log in user name.

Edited by Nightbird, 30 June 2022 - 09:47 AM.


#2 w0qj

    Member

  • PipPipPipPipPipPipPipPipPip
  • Hidden Wolf
  • Hidden Wolf
  • 3,809 posts
  • Google+: Link
  • Facebook: Link
  • LocationAt your 6 :)

Posted 30 June 2022 - 10:34 AM

Err... so what benefit would this give?

Less resources used, hence better performance? ;)

#3 LordNothing

    Member

  • PipPipPipPipPipPipPipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 17,559 posts

Posted 30 June 2022 - 02:11 PM

im not sure why you would need to do this. the repair tool is capable of clearing the shader cache as per its settings. and you generally only need to do that if you upgrade drivers, change gpu, or if your cached shaders go corrupt. these are rare events and do not need to be done every time.

also you dont need to have the user edit the code, just use windows environment path variables:

SET gamepath=%ProgramFiles(x86)%\Piranha Games\MWO Portal
SET shaderpath=%UserProfile%\Saved Games\MechWarrior Online\Shaders

that wont work for the oddballs who have their game installed in weird locations, but will catch 99% of users who install by the default settings. oddballs will need a whole new path anyway. im not sure about steam users, i think steam has its own location. worst case scenario you would just have to manually change gamepath to the appropriate location. changing one line instead of 3 is a lot easier for people without a programming background.

you can also use cd with the /d switch, so it will change the drive and path at the same time. so instead of

c:
cd %gamepath%

use

cd /d %gamepath%

Edited by LordNothing, 30 June 2022 - 02:57 PM.


#4 Meep Meep

    Member

  • PipPipPipPipPipPipPipPipPip
  • Ace Of Spades
  • Ace Of Spades
  • 3,158 posts
  • LocationBehind You

Posted 30 June 2022 - 05:26 PM

As others have said the repair tool already does this but I'm unsure why you would want to do it every startup? If the games shader cache is getting corrupted every time you play then something else is afoot.

#5 MrVaad

    Member

  • PipPipPipPipPipPip
  • Giant Helper
  • Giant Helper
  • 300 posts
  • LocationFrance

Posted 01 July 2022 - 01:45 AM

Erasing the shader cache should only be done if you have graphic problems.

Quote

During the play of a level, at runtime, necessary shaders will be requested with all the variables defined, such as lighting configuration and the usage of techniques like fog or transparency. If a shader is not found in the Shader Cache, it will have to be compiled locally

You can have hundreds, even thousands of files in the cache Posted Image

If you erase the cache, MWO will have to recompile again when you encounter each usage (although some are handled when you start a map).

Edited by MrVaad, 01 July 2022 - 01:58 AM.


#6 MrMadguy

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,304 posts

Posted 01 July 2022 - 02:40 AM

Yeah, delete shader cache and get extra lags in game due to shaders recompiling.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users