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

Modulate: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed to use Shader template)
mNo edit summary
Line 1: Line 1:
{{Source topicon}} {{lang}}
{{Shader|Modulate}} It modulates the colors of any pixels behind it.
{{Shader|Modulate}} It modulates the colors of any pixels behind it.



Revision as of 06:33, 5 February 2023

English (en)Translate (Translate)

Shader-ball.png Modulate It modulates the colors of any pixels behind it.

Tip.pngTip: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.
GIF Animation showing "Modulate" shader in action.
Picture showing the difference between $mod2x 0 and 1.

Description

Accepts only the following parameters:

$basetexture              "texture" //Multiplies the color behind it with this surface's texture.
$mod2x                    "boolean"  //Doubles the modulation, making it appear brighter. 1 enables this, 0 disables. Disabled by default.
$nocull                   "boolean"  //Draws triangles from both sides, not just one. 1 enables this, 0 disables. Disabled by default.
Note.pngNote:Does not accept any translucency parameters, including $alpha, $alphatest, $additive and $translucent.

See also