model/bsp: Quake 1 / Half-Life / Quake II materials link their texture (baseColorTexture), as Quake III does

This commit is contained in:
4DBug committed 2026-11-01 20:10:47 -06:00
1 parent 58df9e8a3a
commit 351f6620dd
7 files changed
+322 -318

No files matched your search

+1
View File
@@ -324,6 +324,7 @@ function Quake.decode(b: buffer, base: number, lumps: { [string]: Lump }, varian
table.insert(scene.textures, tex)
local mat = Scene.material(t.name)
mat.metallic = 0
mat.baseColorTexture = { texture = #scene.textures }
mat.extras = { bsp = { texels = if t.texels then true else nil, width = t.width, height = t.height, lightmap = lmTex, lightmapTexCoord = if lmTex then 1 else nil } } :: any
table.insert(scene.materials, mat)
end