BSPX

BSPX is a standard for adding new lumps to id Tech 2,
id Tech 3, and
GoldSrc BSP files, which are used to add additional features to be used by source ports or custom renderers without breaking vanilla compatibility. As BSPX lumps are placed at the end of the BSP file, they are not loaded by vanilla engines, so a BSP with BSPX lumps is backwards compatible.
Structure
typedef struct {
char lumpname[24]; // up to 23 chars, zero-padded
int fileofs; // from file start
int filelen;
} bspx_lump_t;
typedef struct {
char id[4]; // 'BSPX'
int numlumps;
bspx_lump_t lumps[1];
} bspx_header_t;
Lumps
DECOUPLED_LM
"Decouples" lightmap scale, alignment, and rotation from those of texels.
Compile with ericw-tools using _world_units_per_luxel KV in worldspawn or -world_units_per_luxel # in QBSP, wherein # is the luxel scale (like in Hammer 4.x's face edit window).
The 2023 Quake II remaster uses DECOUPLED_LM with a luxel scale of 8 on all maps except for the Quake II 64 maps.
LIGHTING_E5BGR9
Used for HDR lightmaps. Functions similarly to the RGBE8 lightmaps in Source, but with an additional bit of precision per color instead of having the exponent be 8 bits.
ENVMAP
Defines where cubemaps are found (Does not store the cubemaps themselves). Can be generated (alongside SURFENVMAP) from env_cubemap entities by loading the BSP in FTE and running the mod_findcubemaps console command.
The following FGD entry represents the expected syntax:
@PointClass color(0 0 255) iconsprite("sprites/editor/env_cubemap.spr") = env_cubemap :
"An entity that creates a sample point for the Cubic Environment Map."
[
size(choices) : "Cubemap Size" : 0 : "Resolution of the cubemap." =
[
0 : "Default"
1 : "1x1"
2 : "2x2"
4 : "4x4"
8 : "8x8"
16 : "16x16"
32 : "32x32"
64 : "64x64"
128 : "128x128"
256 : "256x256"
]
]
SURFENVMAP
Used alongside ENVMAP lump to store what cubemap index each brush surface should use.