Difference between revisions of "$mostlyopaque"

From Valve Developer Community
Jump to: navigation, search
m (cat)
(Formatting update)
Line 1: Line 1:
$mostlyopaque
+
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.
  
* 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]].
* Good for improving translucency sorting for things like trees.  
+
 
* cf. [[$opaque]]
+
{{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 ==
 +
<pre>
 +
$mostlyopaque
 +
</pre>
 +
 
 +
== See Also ==
 +
*[[$opaque]] - Similar command for models that have ''mostly'' opaque materials.
  
 
[[Category:QC Commands|mostlyopaque]]
 
[[Category:QC Commands|mostlyopaque]]

Revision as of 04:35, 15 June 2019

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.

Tip:Using either $mostlyopaque or $opaque on all models is good form, as it prevents odd lighting errors and visual artifacts with shadows.

Syntax

$mostlyopaque

See Also

  • $opaque - Similar command for models that have mostly opaque materials.