Things That Refuse To Be Lit
surfaceparm nolightmap support, a real three-stage material pattern classifier, and a shader block merger that was wrong about deluxe lighting.
Fullbright Surfaces
surfaceparm nolightmap is now detected, and fullbright surfaces render with emissive textures, bypassing lightmap application entirely.
New Q3ShaderMaterialFactory.ts and GlowOverlayShaderMaterial.ts, with GLSL that is worth reading because it is the actual lighting equation:
additive: finalColor = litBase + glowColor.rgb * glowIntensity
alpha: finalColor = mix(litBase, glowColor.rgb, glowColor.a * glowIntensity)Three Stages, Classified
The pattern detector works out which stage is the base, which is the lightmap ($lightmap) and which is the glow — an additive blend, or a texture whose name contains _glow, _add or _bloom.
Commands: shader pattern <path>, shader glow <intensity> (default 1.0), shader lightmap <intensity> (default 2.0), shader blendmode <add|alpha>. Blend modes: GL_ONE, GL_ONE and GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA. isFullbright was added to Q3ShaderTypes.ts. Tested on wdm1 and wdm11.
Known Limitations
- `if ! deluxe` / `if deluxe` blocks are not parsed correctly. All stages from
all blocks are merged, causing incorrect rendering for shaders like textures/boqu/lightstripe_blue_800.
- The
materialdirective used in deluxe lighting paths is not supported. - Shaders with more than 3 stages or unusual blend combinations may not render
correctly.
All three of those are fixed in v0.9.12, eight months later, under the name deluxe material pipeline. The material directive did arrive early, in v0.8.1 — just not with the conditional blocks around it.