This article's documentation is for anything that uses the Source engine. Click here for more information.

$mostlyopaque: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added note about single-pass render)
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Causes the [[model]] to be rendered in two passes: The first pass renders only the ''opaque'' portions of the model, and the second pass renders only the ''translucent'' portion of the model.  
{{LanguageBar}}
{{this is a|QC command|name=$mostlyopaque}} It causes the [[model]] to be rendered in two passes: The first pass renders only the ''opaque'' portions of the model, and the second pass renders only the ''translucent'' portion of the model.  


The use of <code>$mostlyopaque</code> can be used to improve the visual quality of models such as foliage or underbrush, by improving the lighting on the translucent [[materials]].
The use of <code>$mostlyopaque</code> can be used to improve the visual quality of models such as foliage or underbrush, by improving the lighting on the translucent [[materials]].
{{tip|Using either <code>$mostlyopaque</code> or <code>[[$opaque]]</code> on ''all models'' is good form, as it prevents odd lighting errors and visual artifacts with shadows.}}


== Syntax ==
== Syntax ==
<pre>
$mostlyopaque
$mostlyopaque
</pre>
 
== See Also ==
*[[$opaque]] - Similar command for models that have ''mostly'' opaque materials, and renders in one pass.


[[Category:QC Commands|mostlyopaque]]
== See also ==
* [[$opaque]] - Similar command for models that have ''mostly'' opaque materials, and renders in one pass.

Latest revision as of 21:39, 18 July 2025

English (en)Translate (Translate)

$mostlyopaque is a QC command available in all Source Source games. It causes the model to be rendered in two passes: The first pass renders only the opaque portions of the model, and the second pass renders only the translucent portion of the model.

The use of $mostlyopaque can be used to improve the visual quality of models such as foliage or underbrush, by improving the lighting on the translucent materials.

Syntax

$mostlyopaque

See also

  • $opaque - Similar command for models that have mostly opaque materials, and renders in one pass.