$warpindex diff: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 8: Line 8:


All 34 for '''$warpindex_diff''' showcased in this [https://youtu.be/GrICPX3bXiU video], for '''$warpindex_spec''' watch this [https://youtu.be/jryH6l_bztQ video].
All 34 for '''$warpindex_diff''' showcased in this [https://youtu.be/GrICPX3bXiU video], for '''$warpindex_spec''' watch this [https://youtu.be/jryH6l_bztQ video].
{{bug|hidetested=1|The UV is slightly bugged.}}
{{bug|hidetested=1|Atlas needs to use point sampling otherwise it will have errors caused by bicubic sampling.}}
{{bug|hidetested=1|Atlas needs to use point sampling otherwise it will have errors caused by bicubic sampling.}}

Latest revision as of 03:43, 5 November 2025

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:The UV is slightly bugged.
Icon-Bug.pngBug:Atlas needs to use point sampling otherwise it will have errors caused by bicubic sampling.