Skip to content

Commit

Permalink
add HDR support
Browse files Browse the repository at this point in the history
  • Loading branch information
Python1320 committed Aug 13, 2023
1 parent 5f1b20f commit 6054bc8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6054bc8

Please sign in to comment.