Add slang shader for ray tracing basic sample

This commit is contained in:
Sascha Willems 2025-04-27 17:40:20 +02:00
parent 33cab712ca
commit a4354cdb2e
4 changed files with 87 additions and 4 deletions

17
shaders/slang/_rename.py Normal file
View file

@ -0,0 +1,17 @@
# Copyright (C) 2025 by Sascha Willems - www.saschawillems.de
# This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
from shutil import move
# To match required file names to fother shading languages that don't support multiple entry points, shader files may need to be renamed for some samples
def checkRenameFiles(samplename):
mappings = {}
match samplename:
case "raytracingbasic":
mappings = {
"raytracingbasic.rchit.spv": "closesthit.rchit.spv",
"raytracingbasic.rmiss.spv": "miss.rmiss.spv",
"raytracingbasic.rgen.spv": "raygen.rgen.spv",
}
for x, y in mappings.items():
move(samplename + "\\" + x, samplename + "\\" + y)