mirror of
https://github.com/opus-tango/IntroductionToVulkan.git
synced 2026-11-14 20:17:00 +00:00
Updated shader compiling bat file.
This commit is contained in:
@@ -8,8 +8,8 @@ REM // Licensed under the Apache License, Version 2.0 (the "License");
REM // yo
|
|||||||
REM /////////////////////////////////////////////////////////////////////////////////////////////
|
REM /////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
if [%1] == [] (
|
if [%1] == [] (
|
||||||
echo No arguments provided! Please specify folder number.
|
echo No arguments provided! Please specify subfolder and number.
|
||||||
echo Example usage: compile_shaders.bat 03
|
echo Example usage: compile_shaders.bat Tutorials\03
|
||||||
goto end
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -26,15 +26,27 @@ goto end
|
|||||||
|
|
||||||
:convert
|
:convert
|
||||||
|
|
||||||
set folder=Tutorial%1/Data%1
|
set folder=%1\Data
|
||||||
echo Converting GLSL shaders into SPIR-V assembly in the "%folder%" folder.
|
|
||||||
|
|
||||||
if exist %folder%/shader.vert (
|
if not exist %folder% (
|
||||||
glslangValidator.exe -V -H -o %folder%/vert.spv %folder%/shader.vert > %folder%/vert.spv.txt
|
echo Could not find specified folder.
|
||||||
|
goto end
|
||||||
)
|
)
|
||||||
|
|
||||||
if exist %folder%/shader.frag (
|
if exist %folder%\shader.vert (
|
||||||
glslangValidator.exe -V -H -o %folder%/frag.spv %folder%/shader.frag > %folder%/frag.spv.txt
|
echo Converting the following shader file: %folder%\shader.vert
|
||||||
|
glslangValidator.exe -V -H -o %folder%\vert.spv %folder%\shader.vert > %folder%\vert.spv.txt
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist %folder%\shader.frag (
|
||||||
|
echo Converting the following shader file: %folder%\shader.frag
|
||||||
|
glslangValidator.exe -V -H -o %folder%\frag.spv %folder%\shader.frag > %folder%\frag.spv.txt
|
||||||
|
)
|
||||||
|
|
||||||
|
set target=build\Data\%1
|
||||||
|
if exist %target% (
|
||||||
|
echo Copying files to %target%:
|
||||||
|
copy /Y %folder%\*.* %target%
|
||||||
)
|
)
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
|||||||
Reference in New Issue
Block a user