diff --git a/DirectXTex/Shaders/CompileShaders.cmd b/DirectXTex/Shaders/CompileShaders.cmd index 76e340d..96dbbee 100644 --- a/DirectXTex/Shaders/CompileShaders.cmd +++ b/DirectXTex/Shaders/CompileShaders.cmd @@ -9,6 +9,16 @@ rem Copyright (c) Microsoft Corporation. All rights reserved. setlocal set error=0 +set PCFXC="%WindowsSdkBinPath%%WindowsSDKVersion%\x86\fxc.exe" +if exist %PCFXC% goto continue +set PCFXC="%WindowsSdkDir%bin\%WindowsSDKVersion%\x86\fxc.exe" +if exist %PCFXC% goto continue +set PCFXC="%WindowsSdkDir%bin\x86\fxc.exe" +if exist %PCFXC% goto continue + +set PCFXC=fxc.exe + +:continue call :CompileShader BC7Encode TryMode456CS call :CompileShader BC7Encode TryMode137CS call :CompileShader BC7Encode TryMode02CS @@ -30,7 +40,7 @@ endlocal exit /b :CompileShader -set fxc=fxc /nologo %1.hlsl /Tcs_4_0 /Zi /Zpc /Qstrip_reflect /Qstrip_debug /E%2 /FhCompiled\%1_%2.inc /FdCompiled\%1_%2.pdb /Vn%1_%2 +set fxc=%PCFXC% /nologo %1.hlsl /Tcs_4_0 /Zi /Zpc /Qstrip_reflect /Qstrip_debug /E%2 /FhCompiled\%1_%2.inc /FdCompiled\%1_%2.pdb /Vn%1_%2 echo. echo %fxc% %fxc% || set error=1