garrysmod-requests icon indicating copy to clipboard operation
garrysmod-requests copied to clipboard

HDR static prop lightmaps (RGBA16161616f PPL/`-dumppropmaps` PFM files)

Open piqey opened this issue 5 months ago • 1 comments

Details

Source SDK 2013 Multiplayer (and Garry's Mod) support static prop lightmaps in the form of RGB888 (24-bit SDR) PPL files. According to the VDC Wiki's page on VertexLitGeneric's $lightmap VMT parameter:

image

VRAD ought to be modified to compile static prop lightmaps to RGBA16161616f to support HDR lighting for maps that use it as most already do.

If Garry's Mod supports conditional statements in VMT files like I believe it does, VRAD could generate both LDR and HDR lightmaps for static props, swapping between them depending on which lighting mode is loaded at runtime. An example VMT could look something like this (untested):

"VertexLitGeneric"
{
    $basetexture            "mybasetexture"

    "!HDR?$lightmap"   "lightmap/path"
    "HDR?$lightmap"    "lightmap/path_hdr"
}

Will reference issues #2109, #517 and #2441 for posterity.

piqey avatar Sep 14 '24 19:09 piqey