Refract: Difference between revisions
Jump to navigation
Jump to search
Note:Will not work when applied to world brushes (including func_detail).
No edit summary |
TomEdwards (talk | contribs) (cleanup, new params) |
||
| Line 1: | Line 1: | ||
{{otherlang2|fr=Refract:fr}} | |||
[[File:Refract.jpg|thumb|A refracting [[func_brush]].]] | |||
The '''<code>Refract</code>''' shaders distorts objects behind it. It is similar to <code>[[Water (shader)|Water]]</code>, but does not reflect and so is not restricted to flat surfaces. Can be used to create distorting glass windows etc. | |||
== | {{note|Will not work when applied to [[world brush]]es (including [[func_detail]]).}} | ||
== Syntax == | |||
'''Refract''' | '''Refract''' | ||
{ | { | ||
$normalmap ... | |||
$dudvmap ... | |||
$refracttint "[1 1 1]" | |||
$refractamount .2 | |||
} | } | ||
; <code>[[$normalmap]] <[[string]]></code> | |||
; <code>[[$dudvmap]] <string></code> | |||
: The pattern of refraction is defined by a bump map (DX9+) or DUDV map (DX8-). May be animated. | |||
; <code>$refracttint <[[color]]></code> | |||
; <code>$refracttinttexture <string></code> | |||
: Tints the colour of the refraction either uniformly or per-texel. | |||
; <code>$refractamount <[[float]]></code> | |||
; <code>$bluramount <float></code> | |||
: Strength of the effect. Use low values. | |||
; <code>$forcerefract</code> | |||
: {{confirm|Override for users running with low detail settings?}} | |||
; <code>$vertexcolormodulate</code> | |||
: {{todo|See [[$vertexcolor]].}} | |||
== See also == | == See also == | ||
*<code>[[Water (shader)|Water]]</code> | * <code>[[Water (shader)|Water]]</code> | ||
[[Category:List of Shaders]] | [[Category:List of Shaders]] | ||
Revision as of 07:58, 15 November 2009
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.
Syntax
Refract
{
$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.
$forcerefract
Confirm:Override for users running with low detail settings?$vertexcolormodulate- Todo: See $vertexcolor.