Command line argument to explicitly compile slang shaders for a single sample

This commit is contained in:
Sascha Willems 2025-04-24 20:10:07 +02:00
parent f441a3e0b3
commit 8b405be480

View file

@ -9,6 +9,7 @@ import sys
parser = argparse.ArgumentParser(description='Compile all slang shaders') parser = argparse.ArgumentParser(description='Compile all slang shaders')
parser.add_argument('--slangc', type=str, help='path to slangc executable') parser.add_argument('--slangc', type=str, help='path to slangc executable')
parser.add_argument('--sample', type=str, help='can be used to compile shaders for a single sample only')
args = parser.parse_args() args = parser.parse_args()
def findCompiler(): def findCompiler():
@ -54,7 +55,9 @@ compiler_path = findCompiler()
print("Found slang compiler at %s", compiler_path) print("Found slang compiler at %s", compiler_path)
compile_single_sample = "computeparticles" compile_single_sample = ""
if args.sample != None:
compile_single_sample = args.sample
dir_path = os.path.dirname(os.path.realpath(__file__)) dir_path = os.path.dirname(os.path.realpath(__file__))
dir_path = dir_path.replace('\\', '/') dir_path = dir_path.replace('\\', '/')