$alphatest: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[$translucent]] can sometimes lead to rendering errors, such as a surface behind an object being drawn in front of it. If this happens you may want to consider using '''<code>$alphatest</code>''' instead of <code>$translucent</code>.
[[$translucent]] can sometimes lead to rendering errors, such as a surface behind an object being drawn in front of it. If this happens you may want to consider using '''<code>$alphatest</code>''' instead of <code>$translucent</code>.


<code>$alphatest</code> is far cheaper than <code>$translucent</code>, but reduces the bit depth of the transparency - i.e. creates jagged edges and sacrifices fine quality.
<code>$alphatest</code> is also far cheaper than <code>$translucent</code>, but reduces the bit depth of the transparency - i.e. creates jagged edges and sacrifices fine quality.


== VMT syntax example ==
== VMT syntax example ==

Revision as of 10:02, 20 April 2008

$translucent can sometimes lead to rendering errors, such as a surface behind an object being drawn in front of it. If this happens you may want to consider using $alphatest instead of $translucent.

$alphatest is also far cheaper than $translucent, but reduces the bit depth of the transparency - i.e. creates jagged edges and sacrifices fine quality.

VMT syntax example

      // $translucent 1
      $alphatest 1