$displacementmap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added $displacementwrinkle from cra0kalo's VertexLitGeneric documentation)
No edit summary
Line 14: Line 14:
*[http://youtu.be/2pSf6xYv3mg The shader parameter in use]
*[http://youtu.be/2pSf6xYv3mg The shader parameter in use]


[[Category:List of Shader Parameters|D]]
[[Category:Shader parameters|d]]

Revision as of 09:45, 15 August 2023

The $displacementmap command is an alternative to $bumpmap that uses a heightmap to give the illusion of depth.

It's the most realistic of all the texture shadowing techniques, but consequently is also the most expensive.

It requires a model compiled with $subd. For best results use a relatively high tessellation level.

Todo: Find when it was added into the engine, the earliest example appears to be in Alien Swarm although it works in SFM

Syntax

$displacementmap <texture>
$displacementwrinkle <bool>

External Links