$translucent: Difference between revisions
Jump to navigation
Jump to search
Tip:Certain shader parameters (such as
Warning:
TomEdwards (talk | contribs) |
TomEdwards (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
The <code>[[$translucent]]</code> [[VMT | The <code>[[$translucent]]</code> [[VMT]] command specifies that the material should be partially see-through. The [[alpha channel]] of <code>[[$basetexture]]</code> is used to decide translucency per-pixel. | ||
Any object that has a <code>$translucent</code> material does not affect [[VIS]], and can be seen through by NPCs from any angle. | |||
{{ | {{tip|Certain shader parameters (such as <code>[[$envmap]]</code>) can disable translucency. If you are having trouble getting it to work, try commenting out other parts of the material.}} | ||
{{warning|<code>$translucent</code> can sometimes cause rendering artefacts. Consider <code>[[#$alphatest|$alphatest]]</code> when this happens.}} | |||
==VMT syntax example== | ==VMT syntax example== | ||
$translucent <[[bool]]> | |||
[[LightmappedGeneric]] | [[LightmappedGeneric]] | ||
{ | { | ||
[[$basetexture]] glass\window001a | |||
'''$translucent 1''' | |||
} | } | ||
== | ==Additional parameters== | ||
;<code>$additive <bool></code> | |||
:Renders the texture additively, so that its colors add to, instead of replacing, what is displayed behind. | |||
== $alphatest == | |||
'''<code>$alphatest</code>''' enables low-detail translucency if used instead of <code>$translucent</code>. This drastically lowers quality, but is much faster to draw and can resolve 'flickering' artefacts. | |||
== See also == | |||
*<code>[[$alpha]]</code>, for texture-wide translucency. | |||
[[Category:List of Shader Parameters]] | [[Category:List of Shader Parameters|T]] | ||
[[Category:VMT Transparency]] | [[Category:VMT Transparency]] | ||
__NOTOC__ |
Revision as of 04:16, 13 July 2008
The $translucent
VMT command specifies that the material should be partially see-through. The alpha channel of $basetexture
is used to decide translucency per-pixel.
Any object that has a $translucent
material does not affect VIS, and can be seen through by NPCs from any angle.

$envmap
) can disable translucency. If you are having trouble getting it to work, try commenting out other parts of the material.
$translucent
can sometimes cause rendering artefacts. Consider $alphatest
when this happens.VMT syntax example
$translucent <bool>
LightmappedGeneric { $basetexture glass\window001a $translucent 1 }
Additional parameters
$additive <bool>
- Renders the texture additively, so that its colors add to, instead of replacing, what is displayed behind.
$alphatest
$alphatest
enables low-detail translucency if used instead of $translucent
. This drastically lowers quality, but is much faster to draw and can resolve 'flickering' artefacts.
See also
$alpha
, for texture-wide translucency.