Height fog (YFOG shaders)

SDYFOG, SBTSYFOG, SDLYFOG are the SD/SBTS shaders with the fog coordinate FOG0 = dot(pos, cTMAT0) (a linear function of the model-space position, i.e. height fog when TMAT0 is the y axis) instead of the view depth; the pixel shaders don’t read FOG0 either, like all PC shaders (see “No fog in the PC pixel shaders”). SDLYFOG also adds max(cTMAT1.x − cTMAT1.y · FOG0, 0) to the specular colour: a glow that grows linearly toward one end of the height range. Only st01 uses them (79 of 114 materials; no other versus stage), so the haze in the Xbox st03/st22/st07 is the light script’s distance fog (fixed-function). The TMAT0/TMAT1 values are set by the executable. (lightextras) TMAT0 is decoded (see “Constants from the executable”): world height + an offset. With no pixel shader reading FOG0, the PC build draws no fog at all, neither this height fog nor the light script’s distance fog; Godot draws none either. SDLYFOG’s TMAT1 glow term (in the vertex shader’s specular colour, so visible on PC) is not decoded.