Refract: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (The shader does work on world geometry. Because the people that wrote that may know more than me, I'm just changing 'will' to 'may')
Line 3: Line 3:
The '''<code>Refract</code>''' shaders distorts objects behind it. It is similar to <code>[[Water (shader)|Water]]</code>, but does not reflect.
The '''<code>Refract</code>''' shaders distorts objects behind it. It is similar to <code>[[Water (shader)|Water]]</code>, but does not reflect.


{{note|The shader will not work when applied to world geometry. Make any brushes you want it applied to are attached to entities (excluding [[func_detail]]).}}
{{note|The shader may not work when applied to world geometry. Make any brushes you want it applied to are attached to entities (excluding [[func_detail]]).}}


== Example ==
== Example ==

Revision as of 10:40, 30 July 2009

A refracting func_brush.

The Refract shaders distorts objects behind it. It is similar to Water, but does not reflect.

Note.pngNote:The shader may not work when applied to world geometry. Make any brushes you want it applied to are attached to entities (excluding func_detail).

Example

Refract
{
	$normalmap ...			// Defines the refraction pattern; may be animated
	$dudvmap ...			// As above when running below DX9
	$refracttint "[1 1 1]"		// Colors the refraction
	$refractamount 0.2		// Refraction strength; use low values
}
Tip.pngTip:$additive does not work but values greater than one for $refracttint can make it brighten instead of darken.

See also

Template:Otherlang:en Template:Otherlang:en:fr