@echo off
rem What are the benefits of deleting that pipeline.cache file?
rem Allows you to get rid of graphic bugs, especially after modding
rem What are the benefits of deleting shader cache files?
rem Forces the game to recompile shaders. Useful after setting fMaxAnisotropy=16 in StarfieldCustom.ini,
rem setting up DLSS, etc.
set "pipeline_cache=%LOCALAPPDATA%\Starfield\pipeline.cache"
set "NVidia_cache1=%LOCALAPPDATA%\NVIDIA\DXCache"
set "NVidia_cache2=%LocalAppData%Low\NVIDIA\PerDriverVersion\DXCache"
set "AMD_cache=%LOCALAPPDATA%\AMD\DxCache"
set "Intel_cache=%LocalAppData%Low\Intel\ShaderCache"
rem set "NV_test=%LOCALAPPDATA%\NVIDIA\NVtest"
rem Check if the pipeline.cache file exists and delete it if it does
choice /c YN /M "Do you want to delete shader cache?"
if %ERRORLEVEL% == 2 (
echo Bye-bye.
goto end10
)
if %ERRORLEVEL% == 1 goto start
if %ERRORLEVEL% == 0 (
echo Program terminated.
goto end10
)
:start
if exist "%pipeline_cache%" (
del /q "%pipeline_cache%"
echo Starfield - Pipeline.cache deleted.
goto end1
)
echo Starfield - Pipeline.cache not found.
:end1
if exist "%NVidia_cache1%" (
del /q "%NVidia_cache1%\*.*"
rem del /q "%NV_test%\*.*"
echo NVIDIA cache 1 deleted.
goto end2
)
echo NVIDIA cache 1 not found.
:end2
if exist "%NVidia_cache2%" (
del /q "%NVidia_cache2%\*.*"
echo NVIDIA cache 2 deleted.
goto end3
)
echo NVIDIA cache 2 not found.
:end3
if exist "%AMD_cache%" (
del /q "%AMD_cache%\*.*"
echo AMD cache deleted.
goto end4
)
echo AMD cache not found.
:end4
if exist "%Intel_cache%" (
del /q "%Intel_cache%\*.*"
echo Intel cache deleted.
goto end5
)
echo Intel cache not found.
:end5
echo.
echo If shaders still don't recompile after this, restart your computer (in safe mode maybe)
echo and run it again because some files in DXCache folder may still be in use.
echo.
echo Another solution is to disable-enable/reset shader cache in your designated control panel.
echo NVIDIA: Manage 3D Settings - Shader Cache Size
echo AMD: Graphics - Advanced - Reset Shader Cache
echo More information:
https://www.reddit.com/r/Starfield/comments/16703yo/guide_how_to_force_recompile_shaders/
:end10
pause