Modulate: Difference between revisions
Jump to navigation
Jump to search

Tip:This shader can be effectively used to fake various features that Source may not support, such as vertex coloring or lightmapping on models, by creating a surface above the first one to modulate it.
Note:Does not accept any translucency parameters, including $alpha, $alphatest, $additive and $translucent.
SirYodaJedi (talk | contribs) |
SirYodaJedi (talk | contribs) (→Description: useful to know if porting materials) |
||
Line 10: | Line 10: | ||
{{matParam|$basetexture|texture|Multiplies the color behind it with this surface's texture.}} | {{matParam|$basetexture|texture|Multiplies the color behind it with this surface's texture.}} | ||
{{matParam|$mod2x|boolean|Use [[DecalModulate]] blending instead of multiplication.}} | {{matParam|$mod2x|boolean|Use [[DecalModulate]] blending instead of multiplication. | ||
:{{codenote |Standard multiplication is equivalent to a BlendFunc of [DestinationColor,Zero], and Mod2x is equivalent to a BlendFunc of [DestinationColor, SourceColor]}} }} | |||
{{matParam|$nocull|boolean|Apply effect from through both sides of the polygon, instead of only through the front.}} | {{matParam|$nocull|boolean|Apply effect from through both sides of the polygon, instead of only through the front.}} | ||
Revision as of 16:13, 3 March 2025


Modulate
is a Pixel shader available in all Source games. It modulates the colors of any pixels behind it.

Description
Accepts only the following parameters:
