From 6054bc8e1db10a1bb1370d6ae7b5508b5721b769 Mon Sep 17 00:00:00 2001 From: Python1320 Date: Sun, 13 Aug 2023 21:32:36 +0300 Subject: [PATCH] add HDR support --- init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 19db7ab..2868c42 100644 --- a/init.lua +++ b/init.lua @@ -187,7 +187,11 @@ local function parse_mdl(f, fp) local material = matdat[1] local found for _,path in next,paths do - if dogeneric(("materials/%s/%s.vmt"):format(path,material)) or dogeneric(("materials/%s/%s.vtf"):format(path,material)) then + + local found = dogeneric(("materials/%s/%s.vmt"):format(path,material)) + local found2 = dogeneric(("materials/%s/%s.vtf"):format(path,material)) + local found3 = dogeneric(("materials/%s/%s.hdr.vtf"):format(path,material)) + if found or found2 or found3 then --print("FOUND",path,material) found=true break @@ -219,7 +223,8 @@ function processors:texture() if not self:lower():find("%.[a-z][a-z][a-z]$",-4) then local gotvmt = dogeneric(("materials/%s.vmt"):format(self)) local gotvtf = dogeneric(("materials/%s.vtf"):format(self)) - if gotvmt or gotvtf then return end + local gotvtfhdr = dogeneric(("materials/%s.hdr.vtf"):format(self)) + if gotvmt or gotvtf or gotvtfhdr then return end if dogeneric(("materials/%s.jpg"):format(self)) then return end if dogeneric(("materials/%s.png"):format(self)) then return end