Refract: Difference between revisions
Jump to navigation
Jump to search
Note:Will not work when applied to world brushes (including func_detail).
m (Category rename) |
No edit summary |
||
Line 1: | Line 1: | ||
{{otherlang2|fr=Refract:fr|de=Refract:de}} | {{otherlang2|fr=Refract:fr|de=Refract:de}} | ||
[[File:Refract.jpg|thumb|A refracting [[func_brush]].]] | [[File:Refract.jpg|thumb|250px|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. | 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. |
Revision as of 15:30, 28 October 2011

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.
Caveats
- 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.