Enable shader optimization

This commit is contained in:
SirLynix
2022-06-28 08:57:33 +02:00
parent cefa620b20
commit 622b89b0f5
2 changed files with 3 additions and 2 deletions

View File

@@ -30,13 +30,14 @@ task("compile-shaders")
print("Compiling shaders...")
for _, filepath in pairs(os.files("src/Nazara/*/Resources/**.nzsl")) do
print(" - Compiling " .. filepath)
local argv = {"--compile=nzslb-header", "--partial", filepath }
local argv = {"--compile=nzslb-header", "--partial", "--optimize" }
if option.get("measure") then
table.insert(argv, "--measure")
end
if option.get("benchmark-iteration") then
table.insert(argv, "--benchmark-iteration=" .. option.get("benchmark-iteration"))
end
table.insert(argv, filepath)
os.vrunv(nzsl, argv, { envs = envs })
end
end)