From Valve Developer Community
Revision as of 14:52, 14 July 2011 by MrFourVideoCards (talk | contribs) (added note about water based stuff.)
Jump to: navigation, search
Deutsch Français
A refracting func_brush.

The Refract shaders distorts objects behind it. It is similar to Water, but does not reflect and so is not restricted to flat surfaces. Can be used to create distorting glass windows etc.

Note.png Note: Will not work when applied to world brushes (including func_detail).


	$normalmap ...
	$dudvmap ...
	$refracttint "[1 1 1]"
	$refractamount .2
$normalmap <string>
$dudvmap <string>
The pattern of refraction is defined by a bump map (DX9+) or DUDV map (DX8-). May be animated.
$refracttint <color>
$refracttinttexture <string>
Tints the colour of the refraction either uniformly or per-texel.
$refractamount <float>
$bluramount <float>
Strength of the effect. Use low values.
Confirm:Override for users running with low detail settings?
To do: See $vertexcolor.


  • Currently it is not possible to define an overall alpha mask to indicate where to fall-off refract. This however only applies to the brush based and model geometry, and not particles. To get alpha on brush or model based geometry you can create a normalmap with an alpha channel, and define that as the first $normalmap. Using another normal of your choice you can then define a normalmap for $normalmap2. $normalmap2 will inherit the alpha of the first normalmap, and will act accordingly. This is extremely useful for faking effects like scrolling water of a surface. Where the first normalmap can provide the alpha, and the second normalmap can move along that alpha.

See also