$warpindex_diff / $warpindex_spec

From Valve Developer Community
Revision as of 14:53, 4 November 2025 by MyGamepedia (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The models\effects\lightwarp_atlas.vtf atlas.

$warpindex_diff and $warpindex_spec are material shader parameters for the VertexLitGeneric shader available in Black Mesa Black Mesa. These are shader parameters similar to $lightwarptexture, but used only by deferred new lights. $warpindex_diff is used by lighting diffuse, $warpindex_spec is used by new specular.

The key difference is that instead of using defined in VMT texture, they are using special lightwarp_atlas.vtf atlas texture and creating 34 combos depending on textures from the atlas.

Both parameters takes integer value from -1 to 32, this is how one of the 34 combos can be used. -1 and below means disabled, 32 and above means use 32 value.

All 34 for $warpindex_diff showcased in this video, for $warpindex_spec watch this video.

Icon-Bug.pngBug:Atlas needs to use point sampling otherwise it will have errors caused by bicubic sampling.